- Function Round(x[, decimals])
Round
Round(
x, ! (input) numerical expression
decimals ! (optional) integer expression
)
Arguments
- x
A scalar numerical expression.
- decimals (optional)
An integer expression.
Return Value
Note
The function
Round
can be used in constraints of nonlinear mathematical programs. However, nonlinear solvers may experience convergence problems around the discontinuities of theRound
function.When the numerical expression contains a unit, the function
Round
will first convert the expression to that unit, before evaluating the function itself. See also the optionrounding compatibility
in the option categorybackward compatibility
.
See also
The functions Precision
, Ceil
, Floor
, Trunc
. Arithmetic
functions are discussed in full detail in Arithmetic Functions of the Language
Reference.