This article provides a comprehensive guide on using all the numeric functions available in Decision Model and Notation (DMN). These functions are essential for modeling business decisions in DMN. They perform mathematical operations within DMN models.
DMN Numeric Functions Reference
| Function | Parameters | Example | Result | Purpose |
|---|---|---|---|---|
| abs (value) | A numeric value or an expression that evaluates to a number. | abs (-0.2) | 0.2 | Returns the absolute value of a number |
| ceiling (value, scale) | value (Numeric): Any number (i.e. float, decimal, double, long, in). (Mandatory) scale : Numbers of required scale to be ceiling (optional) | ceiling (42.321, 2) | 42.33 | Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number |
| decimal (n, scale) | n (Numeric): Any number with a floating point (i.e. float, decimal, double, long). (Mandatory) scale (Numeric): Numbers of required scale to be floor (Mandatory) | decimal (0.015, 2) | 0.02 | Returns the value with given scale |
| exp (value) | value(Numeric): the number to calculate the exponential (mandatory) | exp (10) | 22026.465 | Returns the Euler’s number e raised to the power of number. |
| even (value) | any number (mandatory) | even (15) | false | Returns true if the number is even, false if it is odd. |
| floor(value, scale) | value (Decimal Number): Any number with a floating point (i.e. float, decimal, double, long). (Mandatory) scale : Numbers of required scale to be floor (optional) | floor (100.56) | 100 | Returns the largest integer less than or equal to the specified number. |
| log (value) | value (Numeric): The number to calculate log (Mandatory) base is e=2.718281828459045 | log (5) | 1.6094379124341 | Returns the natural logarithm of a specified number. |
| modulo (dividend, divisor) | dividend (Numeric): The number being divided (Mandatory) divisor (Numeric): The number by which dividend is divided (Mandatory) | modulo (12, 5) | 2 | Returns the remainder of the division of dividend by divisor. |
| odd(value) | value(Numeric): any number (mandatory) | odd (15) | true | Returns true if number is odd, false if it is even. |
| round up (value, scale) | value (Numeric): Number to be rounded (Mandatory) scale: Numbers of required decimal to be round to (Mandatory) | round up (23.4567, 2) | 23.46 | Rounds a numeric value to the nearest integral value. |
| round down (value, scale) | value (Numeric): Number to be rounded (Mandatory) scale: Numbers of required decimal to be round to (Mandatory) | round down (23.4567, 2) | 23.45 | Rounds a numeric value to the nearest decimal value. |
| round half up (value, scale) | Returns true if the number is odd, false if it is even. | round half up (23.4567, 2) | 23.46 | Rounds a numeric value to the nearest integral value. |
| round half down (value, scale) | value (Numeric): Number to be rounded (Mandatory) scale: Numbers of required decimal to be round to (Mandatory) | round half down (23.4567, 2) | 23.45 | Rounds a numeric value to the nearest decimal value. |
| sqrt (value) | value (Numeric): the number to calculate sqrt (Mandatory) | sqrt (16) | 4 | Returns the square root of the given number. |

