[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug math/3976] libm rounding modes do not work correctly for many archs



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.
You are watching the reporter of the bug.


Reply to: