summaryrefslogtreecommitdiff
path: root/Modules/cmathmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cmathmodule.c')
-rw-r--r--Modules/cmathmodule.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 36bf4a1e3d..b341c343e1 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -192,7 +192,7 @@ c_acosh(Py_complex z)
PyDoc_STRVAR(c_acosh_doc,
"acosh(x)\n"
"\n"
-"Return the hyperbolic arccosine of x.");
+"Return the inverse hyperbolic cosine of x.");
static Py_complex
@@ -249,7 +249,7 @@ c_asinh(Py_complex z)
PyDoc_STRVAR(c_asinh_doc,
"asinh(x)\n"
"\n"
-"Return the hyperbolic arc sine of x.");
+"Return the inverse hyperbolic sine of x.");
static Py_complex
@@ -353,7 +353,7 @@ c_atanh(Py_complex z)
PyDoc_STRVAR(c_atanh_doc,
"atanh(x)\n"
"\n"
-"Return the hyperbolic arc tangent of x.");
+"Return the inverse hyperbolic tangent of x.");
static Py_complex
@@ -941,9 +941,10 @@ cmath_polar(PyObject *self, PyObject *args)
double r, phi;
if (!PyArg_ParseTuple(args, "D:polar", &z))
return NULL;
+ errno = 0;
PyFPE_START_PROTECT("polar function", return 0)
phi = c_atan2(z); /* should not cause any exception */
- r = c_abs(z); /* sets errno to ERANGE on overflow; otherwise 0 */
+ r = c_abs(z); /* sets errno to ERANGE on overflow */
PyFPE_END_PROTECT(r)
if (errno != 0)
return math_error();
@@ -1060,7 +1061,7 @@ static PyObject *
cmath_isinf(PyObject *self, PyObject *args)
{
Py_complex z;
- if (!PyArg_ParseTuple(args, "D:isnan", &z))
+ if (!PyArg_ParseTuple(args, "D:isinf", &z))
return NULL;
return PyBool_FromLong(Py_IS_INFINITY(z.real) ||
Py_IS_INFINITY(z.imag));