<-- Home
Manage -->


In Arithmetic in Certified Forth Words

Word Name: */MOD
Type: Standard word
Data Stack Signature: n1 n2 n3 -- n4 n5
Return Stack Signature: --
Availability: 200x  ANS94  Forth-83  FIG
Forth 200x Reference: 6.1.0110
ANS94 Reference:

Multiply n1 by n2 producing the intermediate double-cell result d. Divide d by n3 producing the single-cell remainder n4 and the single-cell quotient n5. An ambiguous condition exists if n3 is zero, or if the quotient n5 lies outside the range of a single-cell signed integer. If d and n3 differ in sign, the implementation-defined result returned will be the same as that returned by either the phrase >R M* R> FM/MOD or the phrase >R M* R> SM/REM.

Standard Reference URL: http://forth-standard.org/standard/core/TimesDivMOD




See Also: None listed
Test Code: