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

From: Marcin 'Qrczak' Kowalczyk <qrczak>
Date: Thu Nov 23 16:55:51 2006

Alan Watson <alan_at_alan-watson.org> writes:

> If inexacts are boxed, then the implementor can most simply implement
> eqv? on inexacts with a numerical comparison. In this case, you get #f.

This reasoning is backward. The implementor cannot implement eqv? to
be the same as = on a subset of numbers including +nan.0 *because*
+nan.0 should be eqv? to itself, because every value should be eqv? to
itself.

Another point of disagreement of eqv? and =, in the reverse direction,
is 0.0 and -0.0. The IEEE floating point standard specifies that they
are equal, even though they are distinguishable. So it's natural to
let them be = but not eqv?.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak_at_knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
Received on Thu Nov 23 2006 - 16:55:23 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC