[r6rs-discuss] Re: [Formal] eq?/eqv? misbehave around NaNs

John Cowan cowan at ccil.org
Fri Nov 24 15:43:14 EST 2006


Marcin 'Qrczak' Kowalczyk scripsit:

> Every value must be eqv? to itself. Two values must not be eqv? if
> they can be distinguished by means not involving eq? (or possibly
> involving only certain "safe" uses of eq?). 

I would certainly expect an implementation that provides singles
and doubles to have distinguishing predicates "single?" and
"double?".

>   C99 has signbit() which can distinguish a NaN from its negation

The negation of NaN is NaN.  What signbit() examines is the
*representation* of NaN.

-- 
A rose by any other name                            John Cowan
may smell as sweet,                                 http://www.ccil.org/~cowan
but if you called it an onion                       cowan at ccil.org
you'd get cooks very confused.          --RMS



More information about the r6rs-discuss mailing list