This is the mail archive of the libc-alpha@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]

correct rounding or not?


       Hi,

in sysdeps/ieee754/dbl-64 one can find code coming from IBM's
Accurate Mathematical Library (libultim), with comments claiming
for correct rounding, for example in s_sin.c one can read around
lines 194-197:

/*******************************************************************/
/* An ultimate sin routine. Given an IEEE double machine number x   */
/* it computes the correctly rounded (to nearest) value of sin(x)  */
/*******************************************************************/
...
__sin (double x)

However, it appears that the __sin function is not correctly rounded,
for example for x=8.5546900000006210e-01 it gives 7.5487859961632653e-01
whereas the correct rounding is 7.5487859961632664e-01 (according to mpfr).

Maybe the original code from libultim was modified, in particular the
code that guarantees correct rounding (rounding test + slow path) was
removed?

Anyway, I believe the comments should be modified to accurately
describe what the current code does.

Best regards,
Paul Zimmermann


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