[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IEEE 754 floating-point arithmetic is not completely ordered

This page is part of the web mail archives of SRFI 67 from before July 7th, 2015. The new archives for SRFI 67 contain all messages, not just those from before July 7th, 2015.

In IEEE 754 floating-point arithmetic, if x is NaN then none of x < y, 
x=y, or x>y is true for any y (not even x=x).  How do you propose to 
implement compare-real?  You say sign(x-y) is computed, but this may 
not have a consistent definition if x or y is a NaN.

You give an example involving PLT 208 and coercion of an exact real 
part to inexact because of an inexact imaginary part.  You might note 
that other Scheme implementations may not require or implement this 

Brad Lucier