This I found in clf:
Von:Marcel Hendrix (mhx@iaehv.iae.nl)
Betrifft:IEEE compliance of NaNs
Newsgroups:comp.lang.forth
Datum:2000-09-17 03:22:05 PST
Yesterday I stumbled on a discussion in
comp.lang.fortran concerning the behavior of compilers
in case of floating-point comparisons (thread "IEEE
compliance of NaNs" by Matthew C Roberts).
Intrigued, I wrote a little Forth program to test F> and
friends for various combinations of +NaN, -NaN, +Inf
and -Inf and tested it with Gforth 0.49, Win32Forth 3.5,
VFX and of course iForth.
I found that Gforth crashes when trying to print Nan or
Inf, but does the comparisons flawlessly. Win32Forth
handle lots of tests incorrectly. VFX prints NaNs and Infs
incorrectly and fails for -Inf 1e F<= . VFX also generates
a numeric exception in all cases.
iForth does it all correctly (at least it does now :-)
-marcel
Testcode for IEEE compliance of NaNs