[Top][All Lists]

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

Re: [Chicken-users] expt incorrect in boundary cases

From: fulvio ciriaco
Subject: Re: [Chicken-users] expt incorrect in boundary cases
Date: Tue, 28 Apr 2009 22:13:13 +0200 (CEST)

different standards predicate different behaviour for 1^+infty.
And really there is no good reason to choose any value for it
rather than another.
However I cannot see how this can impact code.
pow(x,y>1e23) = 0       ; x<1.0
              = 1       ; x=1
              = +infty  ; x>1.0
Substituting NaN for 1 has the merit to highlight the singularity
of the case and oblige the coder to take a decision. 
Since this is the problem, only the coder can know what the hell he is
expecting from calling pow(x,y>1e23).

From: Matthew Flatt <address@hidden>
Subject: Re: [Chicken-users] expt incorrect in boundary cases
Date: Tue, 28 Apr 2009 11:55:32 -0600

> At Tue, 28 Apr 2009 13:43:38 -0400, John Cowan wrote:
>> Matthew Flatt scripsit:
>> > For what it's worth,
>> > 
>> >
>> > 
>> > contains a number of platform-specific, FP-related declarations that
>> > reflect how well different libms work in our experience. For example,
>> > POW_HANDLES_INF_CORRECTLY is declared for NetBSD, but not for Linux.
>> Thanks.  However, what counts as "correctly"?  ISO C and the SUS
>> say one thing, IEEE 754 says another.  I assume that for
>> Scheme (as for Java and JavaScript), IEEE should win.
> "Correct" for PLT Scheme does mean IEEE, but I should have named the
> flag "..._AS_IN_IEEE_754" instead of "..._CORRECTLY".

reply via email to

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