summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 4730680..873059f 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -291,9 +291,9 @@ loghelper(PyObject* arg, double (*func)(double), char *funcname)
"math domain error");
return NULL;
}
- /* Value is ~= x * 2**(e*SHIFT), so the log ~=
- log(x) + log(2) * e * SHIFT.
- CAUTION: e*SHIFT may overflow using int arithmetic,
+ /* Value is ~= x * 2**(e*PyLong_SHIFT), so the log ~=
+ log(x) + log(2) * e * PyLong_SHIFT.
+ CAUTION: e*PyLong_SHIFT may overflow using int arithmetic,
so force use of double. */
x = func(x) + (e * (double)PyLong_SHIFT) * func(2.0);
return PyFloat_FromDouble(x);