int can_overflow)
{
double x, r;
- char err_message[150];
x = PyFloat_AsDouble(arg);
if (x == -1.0 && PyErr_Occurred())
return NULL;
if (can_overflow)
PyErr_SetString(PyExc_OverflowError,
"math range error (overflow)");
- else {
- /* temporary code to include the inputs
- and outputs to func in the error
- message */
- sprintf(err_message,
- "math domain error (singularity) "
- "%.17g -> %.17g",
- x, r);
- PyErr_SetString(PyExc_ValueError, err_message);
- }
+ else
+ PyErr_SetString(PyExc_ValueError,
+ "math domain error (singularity)");
return NULL;
}
if (Py_IS_FINITE(r) && errno && is_error(r))