[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Formal Objection: Memoization is not possible in portable R7RS
Per Bothner scripsit:
> IMO this does the wrong thing if you have two different NaN values,
> as allowed by IEEE. Neither is numerically equal to itself,
> but they have different bit-patterns, and eqv? should compare
> them as false.
That conclusion has always seemed metaphysical to me. Why should
they be compared as false? There is no standard Scheme procedure that
can distinguish them. Only deliberate abstraction-breakers like CL's
`decode-float` can do so.
In any case, there is the pragmatic issue that some Schemes follow R5RS
and say that two NaNs are never `eqv?` (because they are never `=`), and
others do not. I can't tell which ones use a "same-bits" approach and
which ones do something different, because I don't know a consistent way
to generate NaNs with distinct bit patterns that works across all Schemes.
If anyone knows how to do so on an x86 (32 bit) Linux box, I would like
to know about it.
> Two different precisions of NaN values should also not be eqv?,
> of course.
My comment is the same.
--
John Cowan http://ccil.org/~cowan cowan@x
The Penguin shall hunt and devour all that is crufty, gnarly and
bogacious; all code which wriggles like spaghetti, or is infested with
blighting creatures, or is bound by grave and perilous Licences shall it
capture. And in capturing shall it replicate, and in replicating shall
it document, and in documentation shall it bring freedom, serenity and
most cool froodiness to the earth and all who code therein. --Gospel of Tux
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports