By introducing the requirement for "floored" division,
Forth 83 produced much controversy and concern on the part of
those who preferred the more common practice followed in other
languages of implementing division according to the behavior
of the host CPU, which is most often symmetric (rounded toward
zero). In attempting to find a compromise position, this
standard provides primitives for both common varieties, floored
and symmetric (see
SM/REM).
FM/MOD is the floored
version.
The committee considered providing two complete sets
of explicitly named division operators, and declined to do so
on the grounds that this would unduly enlarge and complicate
the standard. Instead, implementors may define the normal
division words in terms of either
FM/MOD or
SM/REM providing they document their choice. People
wishing to have explicitly named sets of operators are
encouraged to do so.
FM/MOD may be used, for example,
to define: