Comment by kazinator
4 days ago
The glibc implementation already has tests for several ranges and hacks for them including Taylor series:
https://github.com/lattera/glibc/blob/master/sysdeps/ieee754...
The smallest range is |x| < 1.49011611938477e-8. In this case the routine just returns x, after calling some underflow-checking routine.
So right there, if we neglect this detail in our own wrapper, we may be able to get a speedup, at the cost of sending very small values to the Tayor series.
The next smallest range tested is |x| < 0.125, and after that |x| < 0.5 and 0.75.
The authors are cetainly not missing any brilliant trick hiding in plain sight; they are doing a more assiduous job.
No comments yet
Contribute on Hacker News ↗