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
test_math: math.log(-ninf) fails to raise exception on OpenBSD #47932
Comments
Hi, On OpenBSD 4.4, the test_math.py regression test fails with the following: Traceback (most recent call last):
File "Lib/test/test_math.py", line 419, in testLog
self.assertRaises(ValueError, math.log, NINF)
AssertionError: ValueError not raised This is because libm's log function does not return NaN when passed
in mathmodule.c:math_1() errno seems to be deliberately ignored when the |
It's possible that this patch would cause breakage on other systems: So I'm reluctant to mess with math_1, especially this close to a release. An alternative solution would be to check special cases for log directly |
Damien, if you're still there: Please could you try the patch "math_log.patch" attached to bpo-3167, |
I've committed the bpo-3167 fix in revisions r67707 to r67710. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: