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

From: Marcin 'Qrczak' Kowalczyk <qrczak>
Date: Mon Nov 27 17:08:31 2006

Alan Watson <alan_at_alan-watson.org> writes:

> An implementor could implement eqv? on singles or doubles either as a
> bitwise comparison (which would make NaNs with different bit patterns
> not eqv?) or with something like:
>
> (or (and (nan? x) (nan? y))
> (= x y))

Almost. The other special case is (= 0.0 -0.0) but (not (eqv? 0.0 -0.0)).

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak_at_knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
Received on Mon Nov 27 2006 - 17:08:12 UTC

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