[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Trascendental funtion (a check suggested by Monniaux)
From: |
Brian Gough |
Subject: |
Re: [Bug-gsl] Trascendental funtion (a check suggested by Monniaux) |
Date: |
Thu, 17 Jun 2010 18:59:45 +0100 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO) |
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