chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [Chicken-users] [PATCH] Make library tests compare


From: Jim Ursetto
Subject: Re: [Chicken-hackers] [Chicken-users] [PATCH] Make library tests compare numbers within epsilon
Date: Wed, 29 May 2013 18:04:10 -0500

On May 29, 2013, at 3:53 PM, Peter Bex <address@hidden> wrote:

> The fpsin expands to a C inline call to sin(), whereas the sin() call
> expands to a call to C_a_i_flonum_sin, which is not inlineable so it has
> to issue a proper function call.  This then goes through libm, which is
> potentially different from the sin() implementation in gcc.

That was my guess, but when I built library-tests with Chicken 4.8.0.1, both 
fpsin and sin expanded to C_a_i_flonum_sin.  This must have been user error on 
my part.  Since you observed an inline sin(), that's definitely the issue, and 
your patch looks correct.

BTW machine epsilon for double is closer to 1e-16 than 1e-10 but it should be 
ok for our purposes (as wise men said, "when in doubt, consult a numerical 
analyst").

Jim


reply via email to

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