<< mps_mul mpscilab mps_neg >>

mpscilab >> mpscilab > mps_nearfloat

mps_nearfloat

Get previous or next floating-point number

Calling Sequence

mps_nearfloat( op, dir )

Arguments

op

multi-precision matrix

dir

string "succ" or "pred"

Description

Computes for each element of op the next higher (dir = "succ") or lower (dir = "pred") floating point number in the precision of op.

Examples

// Standard usage.
A = [1 2; 3 4]
mpsA = mps_init2(A,100)

mps_nextfloat(mpsA, "succ")
<< mps_mul mpscilab mps_neg >>