mod
Calculates the remainder (modulo) of a value.
Indirect parameter passing is disabled
2
No. | Type | Description |
---|---|---|
1. input |
numeral | Divisor Value to divide by dividend |
2. input |
numeral | Dividend Dividend is used for the division following extracting the remainder value Default value: 1 |
Type | Description |
---|---|
numeral | Remainder Calculated remainder |
Values provided is not a numerals
rounding intervals is negative or zero
for all parameters( { {10, 3}, {10.25,0.02}, {10.5, 2} }, p[] )
echo( p[]{0}, " mod ", p[]{1}, " = ", mod( p[]{0}, p[]{1} ) );
10 mod 3 = 1
10.25 mod 0.02 = 0.01
10.5 mod 2 = 0.5