summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index fde2380..b5fb9cf 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -675,18 +675,7 @@ float_pow(PyObject *v, PyObject *w, PyObject *z)
/* Sort out special cases here instead of relying on pow() */
if (iw == 0) { /* v**0 is 1, even 0**0 */
- PyFPE_START_PROTECT("pow", return NULL)
- if ((PyObject *)z != Py_None) {
- double iz;
- CONVERT_TO_DOUBLE(z, iz);
- ix = fmod(1.0, iz);
- if (ix != 0 && iz < 0)
- ix += iz;
- }
- else
- ix = 1.0;
- PyFPE_END_PROTECT(ix)
- return PyFloat_FromDouble(ix);
+ return PyFloat_FromDouble(1.0);
}
if (iv == 0.0) { /* 0**w is error if w<0, else 1 */
if (iw < 0.0) {