{
    "mode": "pydoc",
    "parameter": "cmath",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/cmath/json",
    "generated": "2026-06-02T13:19:16Z",
    "sections": {
        "NAME": {
            "content": "cmath\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides access to mathematical functions for complex\nnumbers.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "acos",
                    "content": "Return the arc cosine of z.\n"
                },
                {
                    "name": "acosh",
                    "content": "Return the inverse hyperbolic cosine of z.\n"
                },
                {
                    "name": "asin",
                    "content": "Return the arc sine of z.\n"
                },
                {
                    "name": "asinh",
                    "content": "Return the inverse hyperbolic sine of z.\n"
                },
                {
                    "name": "atan",
                    "content": "Return the arc tangent of z.\n"
                },
                {
                    "name": "atanh",
                    "content": "Return the inverse hyperbolic tangent of z.\n"
                },
                {
                    "name": "cos",
                    "content": "Return the cosine of z.\n"
                },
                {
                    "name": "cosh",
                    "content": "Return the hyperbolic cosine of z.\n"
                },
                {
                    "name": "exp",
                    "content": "Return the exponential value ez.\n"
                },
                {
                    "name": "isclose",
                    "content": "Determine whether two complex numbers are close in value.\n\nreltol\nmaximum difference for being considered \"close\", relative to the\nmagnitude of the input values\nabstol\nmaximum difference for being considered \"close\", regardless of the\nmagnitude of the input values\n\nReturn True if a is close in value to b, and False otherwise.\n\nFor the values to be considered close, the difference between them must be\nsmaller than at least one of the tolerances.\n\n-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is\nnot close to anything, even itself. inf and -inf are only close to themselves.\n"
                },
                {
                    "name": "isfinite",
                    "content": "Return True if both the real and imaginary parts of z are finite, else False.\n"
                },
                {
                    "name": "isinf",
                    "content": "Checks if the real or imaginary part of z is infinite.\n"
                },
                {
                    "name": "isnan",
                    "content": "Checks if the real or imaginary part of z not a number (NaN).\n"
                },
                {
                    "name": "log",
                    "content": "log(z[, base]) -> the logarithm of z to the given base.\n\nIf the base is not specified, returns the natural logarithm (base e) of z.\n"
                },
                {
                    "name": "log10",
                    "content": "Return the base-10 logarithm of z.\n"
                },
                {
                    "name": "phase",
                    "content": "Return argument, also known as the phase angle, of a complex.\n"
                },
                {
                    "name": "polar",
                    "content": "Convert a complex from rectangular coordinates to polar coordinates.\n\nr is the distance from 0 and phi the phase angle.\n"
                },
                {
                    "name": "rect",
                    "content": "Convert from polar coordinates to rectangular coordinates.\n"
                },
                {
                    "name": "sin",
                    "content": "Return the sine of z.\n"
                },
                {
                    "name": "sinh",
                    "content": "Return the hyperbolic sine of z.\n"
                },
                {
                    "name": "sqrt",
                    "content": "Return the square root of z.\n"
                },
                {
                    "name": "tan",
                    "content": "Return the tangent of z.\n"
                },
                {
                    "name": "tanh",
                    "content": "Return the hyperbolic tangent of z.\n"
                }
            ]
        },
        "DATA": {
            "content": "e = 2.718281828459045\ninf = inf\ninfj = infj\nnan = nan\nnanj = nanj\npi = 3.141592653589793\ntau = 6.283185307179586\n",
            "subsections": []
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "cmath",
    "flags": [],
    "examples": [],
    "see_also": []
}