diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst index 55035e0a16c6bb..4090e19762a8f5 100644 --- a/Doc/library/cmath.rst +++ b/Doc/library/cmath.rst @@ -38,6 +38,57 @@ the function is then applied to the result of the conversion. 1.4142135623730951j +==================================================== ============================================ +**Conversions to and from polar coordinates** +-------------------------------------------------------------------------------------------------- +:func:`phase(z) ` Return the phase of *z* +:func:`polar(z) ` Return the representation of *z* in polar coordinates +:func:`rect(r, phi) ` Return the complex number *z* with polar coordinates *r* and *phi* + +**Power and logarithmic functions** +-------------------------------------------------------------------------------------------------- +:func:`exp(z) ` Return *e* raised to the power *z* +:func:`log(z[, base]) ` Return the logarithm of *z* to the given *base* (*e* by default) +:func:`log10(z) ` Return the base-10 logarithm of *z* +:func:`sqrt(z) ` Return the square root of *z* + +**Trigonometric functions** +-------------------------------------------------------------------------------------------------- +:func:`acos(z) ` Return the arc cosine of *z* +:func:`asin(z) ` Return the arc sine of *z* +:func:`atan(z) ` Return the arc tangent of *z* +:func:`cos(z) ` Return the cosine of *z* +:func:`sin(z) ` Return the sine of *z* +:func:`tan(z) ` Return the tangent of *z* + +**Hyperbolic functions** +-------------------------------------------------------------------------------------------------- +:func:`acosh(z) ` Return the inverse hyperbolic cosine of *z* +:func:`asinh(z) ` Return the inverse hyperbolic sine of *z* +:func:`atanh(z) ` Return the inverse hyperbolic tangent of *z* +:func:`cosh(z) ` Return the hyperbolic cosine of *z* +:func:`sinh(z) ` Return the hyperbolic sine of *z* +:func:`tanh(z) ` Return the hyperbolic tangent of *z* + +**Classification functions** +-------------------------------------------------------------------------------------------------- +:func:`isfinite(z) ` Check if all components of *z* are finite +:func:`isinf(z) ` Check if any component of *z* is infinite +:func:`isnan(z) ` Check if any component of *z* is a NaN +:func:`isclose(a, b, *, rel_tol, abs_tol) ` Check if the values *a* and *b* are close to each other + +**Constants** +-------------------------------------------------------------------------------------------------- +:data:`pi` *π* = 3.141592... +:data:`e` *e* = 2.718281... +:data:`tau` *τ* = 2\ *π* = 6.283185... +:data:`inf` Positive infinity +:data:`infj` Pure imaginary infinity +:data:`nan` "Not a number" (NaN) +:data:`nanj` Pure imaginary NaN +==================================================== ============================================ + + Conversions to and from polar coordinates -----------------------------------------