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
| Parameter | Type | Description |
|---|---|---|
| n | number | the number to round |
| scale | number | decimal digits to keep |
Examples
decimal(1/3, 2)
0.33
Try it →
decimal(1.5, 0)
2
Try it →
decimal(2.5, 0)
2
Try it →
Related functions
round half up · floor · ceiling
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).