John Cowan <cowan_at_ccil.org> writes:
> I don't agree that it's silly: I think implementations should be
> allowed to adopt any of these.
eqv? which is an equivalence relation is useful. Hash table lookup
or function memoization makes little sense for NaN if the relation
used is not reflexive, and memoization can be wrong if 0.0 is not
distinguished from -0.0.
>> Distinguishing them leads to a simpler implementation:
>
> Not necessarily. If the implementation language is C, then it
> provides IEEE equality of doubles but does not provide bitwise
> comparison of doubles as values
I meant: if eqv? behaving like = is ruled out, then eqv? comparing bit
representations is simpler to implement than eqv? treating any NaN as
eqv? to any NaN.
--
__("< Marcin Kowalczyk
\__/ qrczak_at_knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Received on Wed Sep 20 2006 - 17:09:21 UTC