[r6rs-discuss] eqv? seems unwell

From: Alan Watson <alan>
Date: Wed, 27 Jun 2007 19:31:52 -0500

Alan Watson wrote:
> John Cowan wrote:
>> I think the problem can be removed by adding the words
>> "other than eq?" to the end.
>
> I agree.
>
> I think there is also a problem with this part:
>
> "Note: The eqv? procedure returning #t when obj1 and obj2 are number
> objects does not imply that = would also return #t when called with obj1
> and obj2 as arguments."
>
> Unless I am very much mistaken, I think both instances of #t in this
> statement should be #f.

I am very much mistaken; I had forgotten about NaNs.

However, I think this might be better put as:

"Note: The value returned by the eqv? procedure when obj1 and obj2 are
number objects need not be the same as the value returned by the =
procedure when called with obj1 and obj2 as arguments."

This includes cases in which eqv? returns #t but = returns #f (which
might be the case if both objects are NaNs) and cases in which eqv?
returns #f but = returns #t (e.g., if obj1 is an exact 0 and obj2 is an
inexact 0).

Regards,

Alan
Received on Wed Jun 27 2007 - 20:31:52 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC