bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] Trascendental funtion (a check suggested by Monniaux)


From: Xuebin Wu
Subject: Re: [Bug-gsl] Trascendental funtion (a check suggested by Monniaux)
Date: Thu, 17 Jun 2010 14:37:01 -0700

Hi,

What is gp? Is it some software that can compute with arbitary precision?

I write some program with gmp, and now I have to admit that 1.48E10 is the
more accurate answer now.
It is awkward that the library sinl() function, which works on long double
data, has a less accuracy than sin()...


On Thu, Jun 17, 2010 at 10:59 AM, Brian Gough <address@hidden> wrote:

> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gsl
>


reply via email to

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