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 |
• | The quotient and remainder of two bignums is always a bignum. |
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