<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


*/MOD Search:

In Math Words in TurboForth Kernal

Word Name: */MOD
Type: Standard word
Data Stack Signature: n1 n2 n3 -- n4 n5
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

n1 is first multiplied by n2 producing an intermediate 32-bit result. n4 is the remainder and n5 is the floor of the quotient of the intermediate 32-bit result divided by the divisor n3.

Example:

none

Comment:

A 32-bit intermediate product is used as for */ . n4 has the same sign as n3 or is zero. An ambiguous condition results if the divisor is zero or if the quotient falls outside of the range {-32,768..32,767}.

See Also: /MOD 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>