diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 17:17:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 17:17:03 (GMT) |
commit | 46e1ce214b5711e8dae63a1b5a0a7aafb371baf0 (patch) | |
tree | 0230554f5bd4df8804946f5bb0634cefdbbbd2ae /Modules/mathmodule.c | |
parent | 14e461d5b92000ec4e89182fa25ab0d5b5b31234 (diff) | |
parent | 9594942716a8f9c557b85d31751753d89cd7cebf (diff) | |
download | cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.zip cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.tar.gz cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.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; |