Re: [Scheme-reports] Formal Objection: Memoization is not possible in portable R7RS
Per Bothner 26 Nov 2012 00:53 UTC
On 11/25/2012 04:07 PM, Mark H Weaver wrote:
> * Significant change: Fix the NaN problem by making sure that
> two numbers can only be /substantially different/ if at
> least one of them is numerically equal to itself.
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.
Two different precisions of NaN values should also not be eqv?,
of course.
Trying to word-smith this seems too complicated if we want to
finalize R7RS soon. My recommendation is to make eqv? unspecified
when comparing two non-IEEE-754-2008 inexact numbers. I don't
see any crying need to specify this precisely.
I also agree it's non-ideal that NaNs are unspecified even for
IEEE-754-2008. I think the intended meaning is
obj1 and obj2 are both inexact real numbers conforming
to the IEEE 754-2008 standard, have the same type (format),
and have identical bit-patterns.
That is simple, handles the NaN case, and is what most of us
are going to implement anyway.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports