rem ( x y -- z )
Factor handbook > The language > Numbers > Arithmetic > Modular arithmetic

Prev:mod ( x y -- z )
Next:/mod ( x y -- z w )


Vocabulary
math

Inputs and outputs
xa rational
ya rational
za rational


Word description
Computes the remainder of dividing x by y, with the remainder always positive or zero.
Given fixnums, always yields a fixnum.
Given bignums, always yields a bignum.
Given rationals, always yields a rational.


See also
Division by zero, mod

Definition