Re: +nan.0 problems Thomas Bushnell BSG 23 Oct 2005 19:42 UTC

Aubrey Jaffer <xxxxxx@alum.mit.edu> writes:

> Having (real? +nan.0) ==> #f and +nan.0 be an illegal argument to >,
> <, <=, and >= is compatible with IEEE-754.  Just because IEEE-754
> defines a behavior for comparisons with NaN doesn't mean Scheme must
> redefine <, ... so that it accepts non-real arguments.  Scheme already
> has lots of non-real numbers which are illegal arguments to >:
>
>   (> 5 5.+3.i)

I agree with this.

We could, if we chose, provide a different function, called
ieee-compare, which did accept NaNs.