Table of Contents |
Please note that the naming convention used in this word set conveys some important information:
1. Words whose names are of the form 2xxx deal with cell pairs, where the relationship between the cells is unspecified. They may be two-vectors, double-length numbers, or any pair of cells that it is convenient to manipulate together.
2. Words with names of the form Dxxx deal specifically with double-length integers.
3. Words with names of the form Mxxx deal with some combination of single and double integers. The order in which these appear on the stack is determined by long-standing common practice.
Refer to A.3.1 for a discussion of data types in Forth.
Typical use: x1 x2 2CONSTANT name
Typical use: : X ... [ x1 x2 ] 2LITERAL ... ;
Typical use: 2VARIABLE name
In D.R, the R is short for RIGHT.
See:
A.6.1.0320 2* for applicable
discussion.
See:
A.6.1.0330 2/ for applicable
discussion.
There exist number representations, e.g., the sign-magnitude representation, where reduction from double- to single-precision cannot simply be done with DROP. This word, equivalent to DROP on two's complement systems, desensitizes application code to number representation and facilitates portability.
M*/ was once described by Chuck Moore as the most useful arithmetic operator in Forth. It is the main workhorse in most computations involving double-cell numbers. Note that some systems allow signed divisors. This can cost a lot in performance on some CPUs. The requirement for a positive divisor has not proven to be a problem.
M+ is the classical method for integrating.