diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-12-04 11:52:58 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-12-04 11:52:58 (GMT) |
commit | 66f2623fb26011ff18ae6b6f6076d9d9a9b7636e (patch) | |
tree | d3f5c3e2f5a0ea857655828b69bd211101f065c5 | |
parent | 24bcc61f2d8748515356a4e1daac05faed3ae731 (diff) | |
download | cpython-66f2623fb26011ff18ae6b6f6076d9d9a9b7636e.zip cpython-66f2623fb26011ff18ae6b6f6076d9d9a9b7636e.tar.gz cpython-66f2623fb26011ff18ae6b6f6076d9d9a9b7636e.tar.bz2 |
Remove some unecessary '#ifdef Py_NAN's from floatobject.c
-rw-r--r-- | Objects/floatobject.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 8409f0a..d5a3c7e 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -575,13 +575,11 @@ float_div(PyObject *v, PyObject *w) double a,b; CONVERT_TO_DOUBLE(v, a); CONVERT_TO_DOUBLE(w, b); -#ifdef Py_NAN if (b == 0.0) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL; } -#endif PyFPE_START_PROTECT("divide", return 0) a = a / b; PyFPE_END_PROTECT(a) @@ -595,13 +593,11 @@ float_rem(PyObject *v, PyObject *w) double mod; CONVERT_TO_DOUBLE(v, vx); CONVERT_TO_DOUBLE(w, wx); -#ifdef Py_NAN if (wx == 0.0) { PyErr_SetString(PyExc_ZeroDivisionError, "float modulo"); return NULL; } -#endif PyFPE_START_PROTECT("modulo", return 0) mod = fmod(vx, wx); /* note: checking mod*wx < 0 is incorrect -- underflows to @@ -1492,13 +1488,11 @@ float_as_integer_ratio(PyObject *v, PyObject *unused) "Cannot pass infinity to float.as_integer_ratio."); return NULL; } -#ifdef Py_NAN if (Py_IS_NAN(self)) { PyErr_SetString(PyExc_ValueError, "Cannot pass NaN to float.as_integer_ratio."); return NULL; } -#endif PyFPE_START_PROTECT("as_integer_ratio", goto error); float_part = frexp(self, &exponent); /* self == float_part * 2**exponent exactly */ |