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:35:24 +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 #9 from Vincent LefÃvre <vincent-srcware at vinc17 dot net> 2012-02-29 02:35:24 UTC ---
Created attachment 6256
--> http://sourceware.org/bugzilla/attachment.cgi?id=6256
Test a math function in the 4 rounding modes.
(In reply to comment #8)
> * I cannot confirm the problem with sin or cos on x86_64 (though tests should
> be added to the testsuite).
I still get the bug on the argument 100 under Debian (glibc 2.13).
> * pow (1.6, 1.6) does not segfault, but the result in round-upward mode is
> substantially inaccurate;
I confirm, but pow(1.01,1.1) crashes:
N: pow(1.01,1.1000000000000001) = 1.0110054835779234
Z: pow(1.01,1.1000000000000001) = 1.0110054835779232
D: pow(1.01,1.1000000000000001) = 1.0110054835779232
zsh: segmentation fault (core dumped) ./tfct-4rm 1.01 1.1
> pow will need a similar fix (and test in the testsuite).
Yes, like the other functions.
> If other functions have problems in current sources, [...]
I would say that each function probably has the same problem.
I did the tests with
gcc -std=c99 tfct-4rm.c -o tfct-4rm -lm -DFCT=exp
gcc -std=c99 tfct-4rm.c -o tfct-4rm -lm -DFCT=sin
gcc -std=c99 tfct-4rm.c -o tfct-4rm -lm -DFCT=cos
gcc -std=c99 tfct-4rm.c -o tfct-4rm -lm -DFCT=pow -DTWOARGS
using the attached code.
--
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.