diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 16:40:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 16:40:23 (GMT) |
commit | 9594942716a8f9c557b85d31751753d89cd7cebf (patch) | |
tree | 847ee3a06cf8831731d4aa0adaee961accc74fda /Modules/mathmodule.c | |
parent | 4af4d273bd2c18e8e3d56dc43a877ce04a5a1e13 (diff) | |
download | cpython-9594942716a8f9c557b85d31751753d89cd7cebf.zip cpython-9594942716a8f9c557b85d31751753d89cd7cebf.tar.gz cpython-9594942716a8f9c557b85d31751753d89cd7cebf.tar.bz2 |
Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r-- | Modules/mathmodule.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 3fa52d0..4b3e642 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1535,8 +1535,7 @@ math_ldexp(PyObject *self, PyObject *args) } else { PyErr_SetString(PyExc_TypeError, - "Expected an int or long as second argument " - "to ldexp."); + "Expected an int as second argument to ldexp."); return NULL; } @@ -1598,19 +1597,19 @@ PyDoc_STRVAR(math_modf_doc, "Return the fractional and integer parts of x. Both results carry the sign\n" "of x and are floats."); -/* A decent logarithm is easy to compute even for huge longs, but libm can't +/* A decent logarithm is easy to compute even for huge ints, but libm can't do that by itself -- loghelper can. func is log or log10, and name is - "log" or "log10". Note that overflow of the result isn't possible: a long + "log" or "log10". Note that overflow of the result isn't possible: an int can contain no more than INT_MAX * SHIFT bits, so has value certainly less than 2**(2**64 * 2**16) == 2**2**80, and log2 of that is 2**80, which is small enough to fit in an IEEE single. log and log10 are even smaller. - However, intermediate overflow is possible for a long if the number of bits - in that long is larger than PY_SSIZE_T_MAX. */ + However, intermediate overflow is possible for an int if the number of bits + in that int is larger than PY_SSIZE_T_MAX. */ static PyObject* loghelper(PyObject* arg, double (*func)(double), char *funcname) { - /* If it is long, do it ourselves. */ + /* If it is int, do it ourselves. */ if (PyLong_Check(arg)) { double x, result; Py_ssize_t e; |