Re: [Scheme-reports] EQV? on numbers should be based on operational equivalence
Per Bothner 08 May 2012 22:28 UTC
On 05/08/2012 12:06 PM, John Cowan wrote:
> Andrew Robbins scripsit:
>
>>> I believe that they are not: no R7RS (or R6RS, for that matter) standard
>>> procedure can distinguish between one NaN and another.
>>
>> I beg to differ. Consider the functions:
>
> [neat hack using bytevectors snipped]
>
> Right enough. I suppose such bytevector hacks will have to be removed
> from the definition of "operationally equivalent" if it is to be adopted.
> R3RS already excludes eq? and eqv? as well as functions defined in
> terms of them, such as {mem,ass}{q,v}.
Why? If two number written out to bytevectors (or binary files in general)
have different bit-patterns, they're not operationally equivalent, and
they're not eqv?. What is the problem?
--
--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