mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Quick fix for test_math failures on Solaris 10 buildbot. For future
reference, note that that asin(float('inf')) doesn't seem to return the expected NaN on this platform.
This commit is contained in:
parent
9c74b14fe9
commit
66bada5653
2 changed files with 11 additions and 11 deletions
|
@ -181,16 +181,16 @@ math_1_to_whatever(PyObject *arg, double (*func) (double),
|
|||
PyFPE_END_PROTECT(r);
|
||||
if (Py_IS_NAN(r) && !Py_IS_NAN(x)) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"math domain error (invalid argument)");
|
||||
"math domain error"); /* invalid arg */
|
||||
return NULL;
|
||||
}
|
||||
if (Py_IS_INFINITY(r) && Py_IS_FINITE(x)) {
|
||||
if (can_overflow)
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"math range error (overflow)");
|
||||
"math range error"); /* overflow */
|
||||
else
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"math domain error (singularity)");
|
||||
"math domain error"); /* singularity */
|
||||
return NULL;
|
||||
}
|
||||
if (Py_IS_FINITE(r) && errno && is_error(r))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue