Loading

FLOORMOD

math

The FLOORMOD function consumes two NUMBER values, convert them to LONGs and pushes back the floor modulus which is x - (floorDiv(x, y) * y).

Since 2.6.0, this function can be applied to a LIST of numerical values and a numerical value. Considering this fonction as F, the result of $a [ $b $c ] F is [ $a $b F $a $c F ] and the result of [ $a $b ] $c F is [ $a $c F $b $c F ].

Since 2.7.1, this function can be applied to a GTS of numerical values. This is very similar to how this function works on LISTs, considering the values of the GTS. In that case the result is a GTS.

FLOORMOD is available since version 1.2.23.

See also

Signatures

Examples

// The signs of the arguments are the same, the results are the same for % and FLOORMOD 1337 42 % 1337 42 FLOORMOD // The signs of the arguments are different, the results are different for % and FLOORMOD 1337 -42 % 1337 -42 FLOORMOD