-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: confirm accuracy of basic math functions #13515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See also this email thread from 2012 with the author of the python test files on using mpfr to calculate the results |
Not sure it is relevant, but there was also just this to do testing for scipy on scipy-dev: https://mail.python.org/pipermail/scipy-dev/2019-May/023508.html |
glibc has a testsuite for math functions which could be used as input for what is interesting to test: see all the test-out files, they include input output and exceptions |
Python has a test suite for complex numbers when testing cmath based on a text file of results, we should be consistent with these results or document why we differ. |
PR #14048 addressed this issue for float32 exp, log, sin and cos. |
PR #19485 can hopefully close this issue? |
Closing, we now have better accuracy tests |
We do not verify results of our math functions (sin, cos, exp, log, ...) against a "gold standard" which makes changing the algorithms used to calculate them tricky. Python has a tests based on generating "true" values for certain interesting cases. We should explore adding these kinds of tests for the various built-in float and integer types, perhaps mpmath could help generate the "true" values.
The text was updated successfully, but these errors were encountered: