--- Begin Message ---
Package: libc6
Version: 2.11.2-13
The following piece of code :
#include <stdio.h>
#include <math.h>
int
main (int argc,
char* argv[])
{
long double x = 6.0;
printf ("tgammal (%20Lf)=%20Lf\n", x, tgammal (x));
return 0;
}
Prints, on an x86 debian unstable (eglibc 2.11.2-11) :
tgammal ( 6.000000)= 120.000000
And on an ARMel debian unstable (eglibc 2.11.2-13) :
tgammal (6.00000000000000000000)=119.99999999999997157829
That last results if of too poor precision for sage
(http://www.sagemath.org), which I'm porting to the platform.
The box used to run ubuntu, where the problem occurred too
(https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/713985).
Snark on #sage-devel
--- End Message ---
--- Begin Message ---
- To: Julien PUYDT <julien.puydt@laposte.net>, 617894-done@bugs.debian.org
- Subject: Re: Bug#617894: [ARMel] tgammal isn't accurate enough
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Sun, 1 May 2011 17:25:47 +0200
- Message-id: <20110501152547.GA32333@hall.aurel32.net>
- In-reply-to: <4D7CDBE4.3030507@laposte.net>
- References: <4D7B3375.2020508@laposte.net> <20110312111134.GB6288@hall.aurel32.net> <4D7B82D3.4010607@laposte.net> <20110313144918.GA16916@hall.aurel32.net> <4D7CDBE4.3030507@laposte.net>
On Sun, Mar 13, 2011 at 03:59:48PM +0100, Julien PUYDT wrote:
> Le 13/03/2011 15:49, Aurelien Jarno a écrit :
> >On Sat, Mar 12, 2011 at 03:27:31PM +0100, Julien PUYDT wrote:
> >>Isn't that a little short? If I read
> >>http://en.wikipedia.org/wiki/IEEE_754-2008#Basic_formats well, even
> >>simple precision boasts 23 digits.
> >
> >23 binary digits, which means 7.22 decimal digit. For double, it lists
> >15.95 digit, so your example is in the expected precision range.
>
> Oh, dear! Indeed, I was counting the base 10 digits and comparing
> with base 2 digits... that was a stupid and shameful mistake!
>
> Snark on #sage-devel
>
As explained, tgammal() is in the expected accuracy on armel, given this
architecture has double = long double. I am therefore closing the bug.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
--- End Message ---