Hacker News new | ask | show | jobs
by guyomes 745 days ago
If you are ready to spend some precomputation time to compute a good approximation, you can use the Remez algorithm [1]. It is implemented in the Sollya library for machine precision [2,3]. It has notably been used to implement the Core Math library [4] to provide correct rounding for the math functions in the libc library.

[1]: https://en.wikipedia.org/wiki/Remez_algorithm

[2] : https://www.sollya.org/

[3]: https://www.sollya.org/sollya-weekly/sollya.php

[4]: https://core-math.gitlabpages.inria.fr/