This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/6869] sin() and cos() return grossly wrong results when rounding is set to upward


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]