FEEL

modulo

FEEL built-in function · FEEL numeric functions

modulo(dividend, divisor)

Returns the remainder of the division. The result has the sign of the divisor.

The result takes the sign of the divisor, as in floored division, not of the dividend as with the % operator in Java or JavaScript. Decimal operands work too.

Parameters

ParameterTypeDescription
dividendnumberthe value to divide
divisornumberthe divisor, must not be 0

Examples

modulo(12, 5)
modulo(-12, 5)

Edge cases and null handling

modulo(-12, 5)

Sign of the divisor: positive.

modulo(12, -5)
modulo(10.5, 3)
modulo(10, 0)

Related functions

abs · even · odd

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