At Wed, 16 Jun 2010 14:16:47 +0200,
Luciano Ribichini wrote:
> I am studying the GSL with the goal of learning to avoid pitfall in computer 
> science.
> I found a very nice article by Monniaux on the arxiv server cs/0701192 and on 
> page 18
> I found a very nice check of the sinus function.
> 
> y=sin(14885392687.0)
> 
> I wrote a very small program, and I got the wrong result
> 
> y=1.48E-10
> 

Thanks for the email. What sin function do you use - gsl_sf_sin?

This is what I get in Pari with 64-digits of precision:

$ gp
? default(realprecision,64)
%1 = 64

? 14885392687.0/Pi
%3 = 4738167652.000000000047103786916527482860432105403202244461035583
? 14885392687.0-4738167652*Pi
%4 = 1.479809109332217594562699619166045849796144302348 E-10
? sin(14885392687.0-4738167652*Pi)
%5 = 1.479809109332217594557298722864333901077382651758 E-10
 
Maybe you can explain the difference from the paper for me.  

-- 
Brian Gough


_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to