openlibm
openlibm copied to clipboard
accuracy of long double functions
with Openlibm 0.7.5 I still see the following issues for long double functions:
- a somewhat large maximal known error for atanhl (85.4 ulps)
- huge error for lgammal (9.08e19 ulps)
- huge error for tgammal (#223)
- large error for powl (533 ulps) and powl does not work properly in multi-thread mode (#222)
For all other functions, the maximal known error is 5.67 ulps (see https://members.loria.fr/PZimmermann/papers/accuracy.pdf).
I think it may be time to pull new versions from msun
. Are those known to work well?
@zimmermann6 Is it possible for you to also test Julia in your comparisons? Julia increasingly does not rely on openlibm, but has native implementations. I would expect your test harness is C based, and so if Julia's libm exposed a C interface, you may be able to test Julia as well - and otherwise it would be difficult.
if you tell me how to build a libm.a file for Julia (for x86_64 Linux) I can try
Thanks. I'll need to put something together and send you instructions. May take me a few days to get there.
Thanks. I'll need to put something together and send you instructions. May take me a few days to get there.
any progress on that?
Sorry - I haven't had the time to work on this.
@zimmermann6 Are there open source implementations (MIT/BSD) that you are aware of that we can pull in to improve these functions?
yes, on https://core-math.gitlabpages.inria.fr/ you will find such implementations (under a MIT license). Currently we have all C99 single precision functions implemented (correctly rounded) except the powf function (work in progress). Other formats will follow. Performance is comparable (if not better) to the GNU libc and the Intel Math library (which are not correctly rounded).