This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/3976] libm rounding modes do not work correctly for many archs
- From: "vincent-srcware at vinc17 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 29 Feb 2012 02:54:10 +0000
- Subject: [Bug math/3976] libm rounding modes do not work correctly for many archs
- Auto-submitted: auto-generated
- References: <bug-3976-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=3976
--- Comment #10 from Vincent LefÃvre <vincent-srcware at vinc17 dot net> 2012-02-29 02:54:10 UTC ---
(In reply to comment #9)
> I would say that each function probably has the same problem.
Actually log and atan seem to behave correctly (and even honor the rounding
mode).
But tan, sinh and cosh are buggy:
$ ./tfct-4rm 1.6
N: tan(1.6000000000000001) = -34.232532735557314
Z: tan(1.6000000000000001) = -34.232532735557307
D: tan(1.6000000000000001) = -34.232532735557307
U: tan(1.6000000000000001) = -1.9000553624671392
$ ./tfct-4rm 100
N: sinh(100) = 1.3440585709080678e+43
Z: sinh(100) = 1.3440585709080676e+43
D: sinh(100) = 1.3440585709080676e+43
U: sinh(100) = -5.7576991416613074e+42
$ ./tfct-4rm 100
N: cosh(100) = 1.3440585709080678e+43
Z: cosh(100) = 1.3440585709080676e+43
D: cosh(100) = 1.3440585709080676e+43
U: cosh(100) = -5.7576991416613074e+42
tanh seems accurate, but it doesn't honor the rounding mode:
$ ./tfct-4rm 0.8
N: tanh(0.80000000000000004) = 0.66403677026784913
Z: tanh(0.80000000000000004) = 0.6640367702678488
D: tanh(0.80000000000000004) = 0.66403677026784902
U: tanh(0.80000000000000004) = 0.66403677026784891
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.