This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/6869] sin() and cos() return grossly wrong results when rounding is set to upward
- From: "eberlein at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 5 Sep 2008 21:19:17 -0000
- Subject: [Bug math/6869] sin() and cos() return grossly wrong results when rounding is set to upward
- References: <20080905193441.6869.bagnara@cs.unipr.it>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From eberlein at us dot ibm dot com 2008-09-05 21:19 -------
Here are the results for SLES10 SP1, Power6, using Advance
Toolchain GLIBC 2.8, GCC 4.3.1, again very wrong:
theta = 5.27906
sin(theta) = -0.843695
cos(theta) = 0.536822
Repeating after setting the rounding direction to UPWARD:
theta = 5.27906
sin(theta) = -0.0702948
cos(theta) = 9.55255
I also checked the calculation of sin and cos by moving it before setting the
rounding mode and printing it after setting the rounding mode: the correct
results were printed. This indicates the problem is in sin and cos, and not
with io.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |eberlein at us dot ibm dot
| |com
http://sourceware.org/bugzilla/show_bug.cgi?id=6869
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.