JuliaMath / openlibm

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

test: add musl-libc testsuite #298

Open inkydragon opened 7 months ago

inkydragon commented 7 months ago

Do NOT merge with squash commits!

Since there are a lot of new files added, it is recommended to review the changes made after the addition of new tests one by one.


broken tests:

not impl funcs:

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4b83beb) 38.24% compared to head (4644b62) 68.96%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #298 +/- ## =========================================== + Coverage 38.24% 68.96% +30.72% =========================================== Files 233 233 Lines 6139 6142 +3 Branches 1607 1607 =========================================== + Hits 2348 4236 +1888 + Misses 3394 1596 -1798 + Partials 397 310 -87 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ViralBShah commented 7 months ago

Just thinking out aloud, if the musl libm passes all these tests - would it be best to pull out the libm from musl into a standalone library and update openlibm to that?

inkydragon commented 6 months ago

pull out the libm from musl into a standalone library and update openlibm to that?

I like this idea. Moving a step further, we could take the libm related tests from libc-testsuite (for musl) and put them in a standalone project, maybe call it openlibm-test. Instead of adding all these things to openlibm.

Then, we have:


@ViralBShah Another thing I am thinking about is after julia removes its dependency on openlibm (and then links to the system libm by default), would it be more useful to have a libm written by julia than to continue to improve the precision of openlibm?

ViralBShah commented 6 months ago

It's a good idea to have a separate repo for the tests. Julia almost has no dependency on openlibm, except in a few cases where LLVM on win32 needs it for a couple of things.

If the tests are in a separate repo, we can recreate a libm from Julia and then use the testsuite to test the Julia implementation.