mod
Calculates the remainder (modulo) of a value.
Vectorization: This function supports vectorization in the 1st and 2nd function parameter.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
Indirect parameter passing is disabled
Vectorization is allowed in the 1st and 2nd function parameters
2
No. | Type | Description |
---|---|---|
1. input |
numeral set |
Divisor Value or set containing values (vectorization) to divide by dividend |
2. input |
numeral set |
Dividend Dividend value or set containing values (vectorization) is used for the division following extracting the remainder value |
Type | Description |
---|---|
numeral set |
Remainder Calculated remainder |
Values provided is not a numerals
rounding intervals is negative or zero
for all( { {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