VocabularymathInputsOutputsWord descriptionComputes the quotient
z and remainder
w of dividing
x by
y, with the remainder being negative if
x is negative.
| • | The quotient of two fixnums may overflow and yield a bignum; the remainder is always a fixnum |
| • | Integer quotients and remainders are each returned as fixnums when they fit. |
ExamplesUSING: kernel math prettyprint ;
5 3 /mod [ . ] bi@
1
2
USING: kernel math prettyprint ;
5/2 1/3 /mod [ . ] bi@
7
1/6
See alsoDivision by zeroDefinitionMethods