Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b63aff1

Browse files
committed
Revert the temporary change in r62624
1 parent c4352b0 commit b63aff1

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

Modules/mathmodule.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ math_1_to_whatever(PyObject *arg, double (*func) (double),
167167
int can_overflow)
168168
{
169169
double x, r;
170-
char err_message[150];
171170
x = PyFloat_AsDouble(arg);
172171
if (x == -1.0 && PyErr_Occurred())
173172
return NULL;
@@ -184,16 +183,9 @@ math_1_to_whatever(PyObject *arg, double (*func) (double),
184183
if (can_overflow)
185184
PyErr_SetString(PyExc_OverflowError,
186185
"math range error (overflow)");
187-
else {
188-
/* temporary code to include the inputs
189-
and outputs to func in the error
190-
message */
191-
sprintf(err_message,
192-
"math domain error (singularity) "
193-
"%.17g -> %.17g",
194-
x, r);
195-
PyErr_SetString(PyExc_ValueError, err_message);
196-
}
186+
else
187+
PyErr_SetString(PyExc_ValueError,
188+
"math domain error (singularity)");
197189
return NULL;
198190
}
199191
if (Py_IS_FINITE(r) && errno && is_error(r))

0 commit comments

Comments
 (0)