[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Double vs Long Double
From: |
dave |
Subject: |
Re: [Help-gsl] Double vs Long Double |
Date: |
Tue, 2 Oct 2007 12:09:00 +0000 (GMT) |
On Tue, Oct 02, 2007 at 09:56:07AM +0100, Brian Gough wrote:
> At Sat, 29 Sep 2007 00:50:38 +0000 (GMT),
> address@hidden wrote:
> >
> > I just got the GSL book today and immediately
> > tried the sample program on page 9.
> >
> > I did not get the exact same answer shown in the book:
> > JO(5) = -1.775967713143382920e-01
> > I got J)(5) = -1.775967713143382642e-01
> > ^^^
> > I'm running 64-bit AMD OpenBSD 4.1 on AM2 Athlon 64.
>
> Thanks for your email. The results vary in the final bit, 1ulp =
> 2e-16. There are many factors which can affect the result at this
> level (compiler options, order of rounding, etc) -- I've added a note
> to the manual that this is normal.
>
> --
> Brian Gough
I tried computing J0(5) using the Bessel function in the gnu math
library and I got the exact result listed in the book. So I'm wondering
if the difference in the final 3 digits is the result of using double
(64-bit xmm registers vs long double (80-bit temp real in 8087 registers).
--