JuliaMath / openlibm

High quality system independent, portable, open source libm implementation
https://openlibm.org
Other
508 stars 139 forks source link

Is this supposed to be a drop-in replacement for libm? #216

Closed epsilon-0 closed 3 years ago

epsilon-0 commented 3 years ago

I am currently working on the Gentoo Port of this library and we have a mechanism for allowing swapping of libraries during runtime.

I was wondering if it was possible to replace the standard libm by the one provided here. Is this supposed to be API compatible with GNU/Clang libm implementations?

kargl commented 3 years ago

It likely is not a drop in replacement. You'll need to compare the functions supplied with your system's libm to those in openlibm. For example, GNU libm come with long double versions of the Bessel function routines; while openlibm does not appear to implements these. In additional, it would be prudent to compare the accuracy of the libm you are replacing against the accuracy of openlibm.