This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix for bz#13658 - using fsincos on x86-64
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>,"Carlos O'Donell" <carlos at systemhalted dot org>, jakub at redhat dot com,Andreas Schwab <schwab at redhat dot com>
- Date: Wed, 7 Mar 2012 15:28:44 +0100
- Subject: Re: Fix for bz#13658 - using fsincos on x86-64
- References: <4F343F56.3040402@suse.com> <Pine.LNX.4.64.1203071344190.1265@digraph.polyomino.org.uk> <201203071510.55655.aj@suse.com>
On Wednesday, March 07, 2012 15:10:55 Andreas Jaeger wrote:
> On Wednesday, March 07, 2012 14:51:34 Joseph S. Myers wrote:
> > On Wed, 7 Mar 2012, Andreas Jaeger wrote:
> > > So, the result has nothing to do with the expected result. The test
> > > passes on x86-64.
> > >
> > > I could add the testcase and the fix for x86-64 and not run it on
> > > i386 - or only run it on x86-64. What do you propose?
> >
> > Is this failing on i386 with sysdeps/i386/fpu/s_sincos.S removed?
>
> In either case.
>
> > Because I'd expect both x86-64 and i386 to need the same fix at the
> > same time.
> >
> > Actually it looks like s_sincos.c is using __sin and __cos - meaning
> > that i386 would need s_sin.S and s_cos.S removed as well. But I'd
> > guess that sin and cos have the same problems for large inputs
> > (insufficiently accurate range reduction) as sincos and so that making
> > i386 follow x86-64 in using the generic dbl-64 versions of those
> > functions would also be an improvement.
>
> Yes, indeed. Let me check this...
A couple of files need to be removed - and atest-sincos.out fails now :-(
cat math/atest-sincos.out
sin:
785997 failures; 188 errors; error rate 0.02%
maximum error: 0ff5d000c0040fb1cef8029503b8b20d2
error in sin(1): 000000000000000000000012713da512a
cos:
1047956 failures; 2 errors; error rate 0.00%
maximum error: 0a7e6d870d1fb8219961d03f2482f104a
error in cos(1): 00000000000000000000001cb8e2f6306
Something is completly broken with just removing these files:
# deleted: i386/fpu/branred.c
# deleted: i386/fpu/dosincos.c
# deleted: i386/fpu/mpa.c
# deleted: i386/fpu/s_cos.S
# deleted: i386/fpu/s_sin.S
# deleted: i386/fpu/s_sincos.S
# deleted: i386/fpu/sincos32.c
test-double fails with a lot of tests, starting with:
testing double (without inline functions)
Failure: Test: cos (M_PI_6l * 2.0) == 0.5
Result:
is: 4.99861241344128237607e-01 0x1.ffdba01071a860000000p-2
should be: 5.00000000000000000000e-01 0x1.00000000000000000000p-1
difference: 1.38758655871762393019e-04 0x1.22ff7c72bd0000000000p-13
ulp : 1249826861757.0000
max.ulp : 1.0000
I need some more time to investigate this - and would appreciate any help,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126