chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] EQV? and NaN


From: Felix
Subject: Re: [Chicken-users] EQV? and NaN
Date: Mon, 11 Jul 2011 23:53:02 +0200 (CEST)

From: Alan Post <address@hidden>
Subject: Re: [Chicken-users] EQV? and NaN
Date: Mon, 11 Jul 2011 15:07:47 -0600

> On Mon, Jul 11, 2011 at 11:04:09PM +0200, Felix wrote:
>> From: John Cowan <address@hidden>
>> Subject: Re: [Chicken-users] EQV? and NaN
>> Date: Mon, 11 Jul 2011 16:58:09 -0400
>> 
>> > Felix scripsit:
>> > 
>> >> "(eqv? +nan +nan)" being #t would mean violation of R5RS.
>> > 
>> > Technically, yes.  But R5RS didn't anticipate the strange behavior of
>> > NaN.  Furthermore, the discrepancy doesn't seem to bother the developers
>> > and users of Gauche, Gambit, Bigloo, Kawa, Scheme48, Chibi, or STklos,
>> > all of which are R5RS systems.
>> 
>> Just for the record, and to spare you the typing: I generally don't care
>> what all of those systems do. The only authorities that I find acceptable
>> are R5RS, common sense, performance and convenience.
>> 
> 
> It seems that R5RS is violating common sense, and not intentionally so,
> as John tried to articulate in his message.

Yes, I think I understood that much. But R5RS talks about the
arguments being "numerically equal". What stands now to discussion is
what that means.

The fact that +NaN is a number and at the same time is not a number
does not fit into what I consider common sense. It's most strikingly
nonsensical. As if 4 equivalence procedures where not enough, we start
to add special cases to increase confusion even more. Now it's a
number ...  and now it's not! Is it real? Is it rational? 

+NaN is merely a performance hack to keep tight numerical code branch
free. To retroactivelsy give it some metaphysical meaning introduces
countless inconsistencies into language implementations.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]