IEEE 754-2008 BINARY FLOATING-POINT WORDS
-- dnw, October 2, 2020
This is my personal list, for experimental implementation and testing,
and to wind up my contributions to the proposal, which basically ended
in October, 2009.
Taken from the draft ieee-fp-0.5.5.txt and the subsequent
ieee-fp-excepts.txt, unless otherwise indicated. Sections marked
"Experimental" have been implemented in pfe, ieeefp-ext.c.
Some of the words in this list were uncontroversial, others were still
under discussion, and for a few the discussion had hardly begun. The
above and previous drafts may provide a better sense of the state of
things.
In particular, the rounding words in Sec. 7.11 represent the last state
of an unfinished discussion. Pending resolution, I have replaced them
by the experimental words in Sec. 7.11.1, which seem adequate for
implementing whatever turns out to be the final choice.
7.1 Constants
-------------
+INF ( f: -- +Inf )
-INF ( f: -- -Inf )
+NAN ( f: -- +NaN )
-NAN ( f: -- -NaN )
7.11 Rounding modes (version 0.5.1)
-------------------
These and variants were under robust discussion in c.l.f. Nothing was
decided. These and others can be implemented by 7.11.1 below.
This scheme was suggested by Andrew Haley, having emerged from a
discussion with Anton Ertl.
NEAR-ROUNDING CEIL-ROUNDING FLOOR-ROUNDING TRUNC-ROUNDING
NEAR-ROUNDING{ CEIL-ROUNDING{ FLOOR-ROUNDING{ TRUNC-ROUNDING{
}ROUNDING
7.11.1 Rounding modes (Experimental)
---------------------
I like these. They are consistent in style with the exception words in
Secs. 9.1.1 and 9.1.2.
FR-TONEAREST FR-TOWARDZERO FR-DOWNWARD FR-UPWARD (constants)
SET-FROUND GET-FROUND
8.1 Conversion
--------------
D>F F>D
>FLOAT >IEEEFLOAT REPRESENT
SF! SF@ DF! DF@
8.2 Output
----------
F. FE. FS.
8.3 Comparison
--------------
F< F= F> F<= F>= F0< F0= F0> F0<= F0>=
F~
8.4 Classification
------------------
FINITE? FNORMAL? FSUBNORMAL? FINFINITE? FNAN?
8.4.1 Classification (Experimental)
--------------------
These are nice words, but those in Sec. 8.4 are probably preferred.
FCLASSIFY
FP-INFINITE FP-NAN FP-NORMAL FP-SUBNORMAL FP-ZERO (constants)
8.5 Arithmetic
--------------
The math and arithmetic words mostly already exist. Tests should
check their behavior for ieee specials.
F* F*+ F+ F- F/
8.6 Math functions
-------------------
F** FACOS FACOSH FALOG FASIN FASINH FATAN FATAN2
FATANH FCOS FCOSH FEXP FEXPM1 FLN FLNP1 FLOG FSIN
FSINCOS FSINH FSQRT FTAN FTANH
8.7 Sign bit operations
-----------------------
FSIGNBIT FNEGATE FABS FCOPYSIGN
8.8 Nearest integer functions
-----------------------------
FCEIL FLOOR FROUND FTRUNC (Forth 2012)
FNEARBYINT
8.9 Data manipulation
---------------------
FMAX FMIN FNEXTUP FNEXTDOWN
FSCALBN FLOGB FREMAINDER
9.1 Status flags
----------------
FDIVBYZERO FINEXACT FINVALID FOVERFLOW FUNDERFLOW
GET-FSTATUS SET-FSTATUS
9.1.1 Exception Constants (Experimental)
-------------------------
Same as above, with one addition.
FDIVBYZERO FINEXACT FINVALID FOVERFLOW FUNDERFLOW ALL-FEXCEPTS
9.1.2 Status flags (Experimental)
------------------
I prefer these to GET-FSTATUS and SET-FSTATUS.
GET-FFLAGS SET-FFLAGS CLEAR-FFLAGS
9.1.3 Alternate handling (Experimental)
------------------------
INSTALL-FHANDLING SET-FHANDLER GET-FHANDLER
FENABLE FDISABLE FENABLED