- Foreword
- Proposals Process
- 200x Membership
- 1 Introduction
- 2 Terms, notation, and references
- 3 Usage requirements
- 4 Documentation requirements
- 5 Compliance and labeling
- 6 Glossary
- 7 The optional Block word set
- 8 The optional Double-Number word set
- 9 The optional Exception word set
- 10 The optional Facility word set
- 11 The optional File-Access word set
- 12 The optional Floating-Point word set
- 13 The optional Locals word set
- 14 The optional Memory-Allocation word set
- 15 The optional Programming-Tools word set
- 16 The optional Search-Order word set
- 17 The optional String word set
- 18 The optional Extended-Character word set
- Annex A: Rationale
- Annex B: Bibliography
- Annex C: Compatibility analysis
- Annex D: Portability guide
- Annex E: Reference Implementations
- Annex F: Test Suite
- Annex H: Alphabetic list of words
8 The optional Double-Number word set
8.1 Introduction
Sixteen-bit Forth systems often use double-length numbers. However, many Forths on small embedded systems do not, and many users of Forth on systems with a cell size of 32 bits or more find that the use of double-length numbers is much diminished. Therefore, the words that manipulate double-length entities have been placed in this optional word set.
8.2 Additional terms and notation
None.
8.3 Additional usage requirements
8.3.1 Text interpreter input number conversion
When the text interpreter processes a number, except a <cnum>, that is immediately followed by a decimal point and is not found as a definition name, the text interpreter shall convert it to a double-cell number.
For example, entering DECIMAL 1234
leaves the
single-cell number 1234
on the stack, and entering
DECIMAL 1234.
leaves the double-cell number
1234
0
on the stack.
See: 3.4.1.3 Text interpreter input number conversion.
8.4 Additional documentation requirements
8.4.1 System documentation
8.4.1.1 Implementation-defined options
- no additional requirements.
8.4.1.2 Ambiguous conditions
- d outside range of n in 8.6.1.1140 D>S.
8.4.1.3 Other system documentation
- no additional requirements.
8.4.2 Program documentation
- no additional requirements.
8.5 Compliance and labeling
8.5.1 Forth-2012 systems
The phrase "Providing the Double-Number word set" shall be appended to the label of any Standard System that provides all of the Double-Number word set.The phrase "Providing name(s) from the Double-Number Extensions word set" shall be appended to the label of any Standard System that provides portions of the Double-Number Extensions word set.
The phrase "Providing the Double-Number Extensions word set" shall be appended to the label of any Standard System that provides all of the Double-Number and Double-Number Extensions word sets.
8.5.2 Forth-2012 programs
The phrase "Requiring the Double-Number word set" shall be appended to the label of Standard Programs that require the system to provide the Double-Number word set.The phrase "Requiring name(s) from the Double-Number Extensions word set" shall be appended to the label of Standard Programs that require the system to provide portions of the Double-Number Extensions word set.
The phrase "Requiring the Double-Number Extensions word set" shall be appended to the label of Standard Programs that require the system to provide all of the Double-Number and Double-Number Extensions word sets.
8.6 Glossary
8.6.1 Double-Number words
- 8.6.1.0360 2CONSTANT
- 8.6.1.0390 2LITERAL
- 8.6.1.0440 2VARIABLE
- 8.6.1.1040 D+
- 8.6.1.1050 D-
- 8.6.1.1060 D.
- 8.6.1.1070 D.R
- 8.6.1.1075 D0<
- 8.6.1.1080 D0=
- 8.6.1.1090 D2*
- 8.6.1.1100 D2/
- 8.6.1.1110 D<
- 8.6.1.1120 D=
- 8.6.1.1140 D>S
- 8.6.1.1160 DABS
- 8.6.1.1210 DMAX
- 8.6.1.1220 DMIN
- 8.6.1.1230 DNEGATE
- 8.6.1.1820 M*/
- 8.6.1.1830 M+