Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Strategy for accuracy testing #16

Closed
StefanKarpinski opened this issue Aug 26, 2016 · 4 comments
Closed

Strategy for accuracy testing #16

StefanKarpinski opened this issue Aug 26, 2016 · 4 comments

Comments

@StefanKarpinski
Copy link

For single-argument Float32 functions, one can exhaustively test the entire range. It seems like we should do that. For Float16 (supposing we support that, see #15), one can even test two-argument functions exhaustively. There should be a strategy for testing all the libm functions for accuracy. Known hard values + random sampling? For two-arg Float32 functions, we could use a sample of values for each argument and test the full range of the other argument against that.

@ViralBShah
Copy link
Member

I believe @simonbyrne had done this for log. It's not in the tests, as I see, but I do remember discussion about that in the julialang repo.

@oxinabox
Copy link

oxinabox commented Aug 30, 2016

Sleef does Accuracy testing against MPFR
over targetted (large) ranges, determined per function eg [-10:0.0002:10; -10_000_000:200.1:10_000_000; 1:10_000]
Plus targeted tests around things like NaN and Inf

@musm has already ported many (all?) of those 👍

And it would not be hard to generalise those test files. to work for other LibM implementations.

Do we need more than this?

Maybe Fuzzer tests?

@ViralBShah
Copy link
Member

For Float32, we could perhaps test the whole range, but that may be overkill. Perhaps some thought should be put into ill-conditioned cases.

@musm
Copy link
Collaborator

musm commented Aug 31, 2016

Yes all of them have been ported plus a couple of additional ones I noticed Sleef did not test for

@musm musm closed this as completed Jan 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants