decimal

FEEL built-in function · Numeric functions

decimal(n, scale)

Rounds n to the given scale using banker's rounding (round half to even).

Parameters

ParameterTypeDescription
nnumberthe number to round
scalenumberdecimal digits to keep

Examples

decimal(1/3, 2)
decimal(1.5, 0)
decimal(2.5, 0)

Related functions

round half up · floor · ceiling

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).