chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] EQV? and NaN


From: John Cowan
Subject: Re: [Chicken-users] EQV? and NaN
Date: Thu, 14 Jul 2011 03:55:26 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Aleksej Saushev scripsit:

> IEEE P754 mandates at least one function to distinguish between
> signalling and quiet NaNs and mandates proper sign interpretation for
> NaNs (e.g. in copysign).

C99 does not comply with the first point: it knows about only quiet
NaNs.

> > The question is what is the Right Thing to do when NaN is considered
> > as a Scheme object.
>
> Signal exception, as usual. What do you do when you apply "car" to an
> integer number?

The cases are not comparable.  The domain of CAR is pairs, whereas the
domain of EQV? is all Scheme objects.

> In my opinion, if "eqv?" is meant to test "sameness," it should
> compare FPNs bitwise.  At least this won't affect numeric programs and
> will correctly detect same outcomes which return same qNaNs.

There is no guarantee of that either.  FPPs are free to return all zeros
in the mantissa field in every case, for example.

-- 
On the Semantic Web, it's too hard to prove     John Cowan    address@hidden
you're not a dog.  --Bill de hOra               http://www.ccil.org/~cowan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]