chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: IEEE float arithmetic


From: Thomas Chust
Subject: Re: [Chicken-users] Re: IEEE float arithmetic
Date: Thu, 22 Jun 2006 14:03:12 +0200 (CEST)

On Wed, 21 Jun 2006, John Cowan wrote:

Abdulaziz Ghuloum scripsit:

Out of curiosity, why not simply do "f==1.0/0.0 || f==-1.0/0.0" to test
if f is +inf.0/-inf.0?

Umm.  Too obvious, I guess.  I started working these out in
Chicken, where dividing by zero throws an exception, so I
wanted some other method.  But in C, of course, there's no
such issue. [...]

Hello,

are you sure this works on every architecture? I dimly recall having seen systems where NaN != NaN holds, so you have to use the isnan predicate function from the C math library...

cu,
Thomas




reply via email to

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