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: John Cowan
Subject: Re: [Chicken-users] Re: IEEE float arithmetic
Date: Tue, 20 Jun 2006 19:31:22 -0400
User-agent: Mutt/1.3.28i

Abdulaziz Ghuloum scripsit:

> The test [for infinity] is obviously bogus since f==f+1.0 for large values of 
> f.
> (try 1e16)

Oops, quite right.

The expression "f != 0.0 && f == f + f" will work, I think.
0.0 and NaN are rejected by the left side of "&&", and all
other finite values by the right side.

-- 
Andrew Watt on Microsoft:                       John Cowan
Never in the field of human computing           address@hidden
has so much been paid by so many                http://www.ccil.org/~cowan
to so few! (pace Winston Churchill)




reply via email to

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