[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] EQV? on numbers should be based on operational equivalence

Alex Shinn <alexshinn@x> writes:
> On Tue, May 8, 2012 at 8:42 AM, Mark H Weaver <mhw@x> wrote:
>> John Cowan <cowan@x> writes:
>>> Mark H Weaver scripsit:
>>>> In particular, on platforms with signed zeroes, the R7RS should mandate
>>>> that (eqv? 0.0 -0.0) => #false.
>>> R6RS mandates that, but R7RS currently leaves it unspecified.
>> How would you suggest implementing memoization in a portable R7RS
>> program?
> It must be unspecified in R7RS because R7RS
> does not require that implementations distinguish
> between 0.0 and -0.0, nor that they provide +inf.0
> or -inf.0.

That's why I qualified my statement with "on platforms with signed
zeroes".  All I am advocating is that EQV? be based on operational
equivalence, i.e. that we mandate (eqv? 0.0 -0.0) => #true if and only
if 0.0 and -0.0 are operationally equivalent.


Scheme-reports mailing list