Mod Function
Description 1 of 2 (the remainder after whole number division):
note
ARITHMETIC OVERFLOW
This function is non-evaluable if the result of the division would exceed approximately +/- 1.8e308.
For example, dividing by zero.
Returns:
Whole Number
Parameters:
Parameter | Data Type | Description |
|---|---|---|
1 | Whole Number | The first whole number. |
2 | Whole Number | The second whole number. |
Examples:
When using functions inside a field, remember the field brackets:
{Mod(TotalCost, 12)}
Expression | Result |
|---|---|
Mod( 34, 10 ) | 4 |
Mod( 34, 9 ) | 7 |
Mod( -34, 9 ) | 2 |
Description 2 of 2 (the remainder after division):
The remainder after the first number is divided by the second number.
note
ARITHMETIC UNDERERFLOW
This function is non-evaluable if the result of the division would be smaller than approximately +/- 2.2e-308.
For example, dividing a very small number by a very big number.
note
ARITHMETIC OVERFLOW
This function is non-evaluable if the result of the division would exceed approximately +/- 1.8e308.
For example, dividing by zero.
Returns:
Number
Parameters:
Parameter | Data Type | Description |
|---|---|---|
1 | Number | The first number. |
2 | Number | The second number. |
Examples:
When using functions inside a field, remember the field brackets:
{Mod(TotalCost, 12)}
Expression | Result |
|---|---|
Mod( 34.5, 10 ) | 4.5 |
Mod( 34, 9.5 ) | 5.5 |
Mod( -34, 9.5 ) | 4 |