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]

Re: correct rounding or not?


Hi Paul,

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

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

Yes that comment is out  of date - I have posted a patch to fix that [1].
This math code is ancient, extremely slow and buggy, so the plan is to
rewrite like we've done with exp(2)(f)/pow(f)/log(f)/sinf/cosf/sincosf.

There is ongoing work to remove the slow paths first [2], since that causes
the huge 100x slowdowns that most people are complaining about.
Rewriting the actual math code then gives another 2-5x gain.

Cheers,
Wilco

[1] https://www.sourceware.org/ml/libc-alpha/2020-01/msg00647.html
[2] https://www.sourceware.org/ml/libc-alpha/2020-01/msg00574.html

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