Exponential functions¶
Exponential function
Complex and real valued implementations of the exponential function.
- boring_math.special_functions.exponential.exp.exp0(x: float, /, n: int = mindepth) float¶
Real exponential function about
x = 0Best if
-1 <= x <= 1forn >= 22.- Parameters:
x – Independent variable.
n – Terms in expansion, must have
n >= 2.
- Returns:
Taylor series expansion of
eˣcentered atx = 0.
- boring_math.special_functions.exponential.exp.exp(x: float, /, n: int = mindepth) float¶
Real exponential function about
x = 0.Valid for extended value floating point arguments.
- Parameters:
x – Independent variable.
n – Terms in expansion, must have
n >= 2.
- Returns:
Value of
eˣotherwisenanifx = nan.
- boring_math.special_functions.exponential.exp.cexp0(z: complex, /, n: int = mindepth) complex¶
Complex exponential function about
z = 0.Best if
|z| <= 1andn >= 22.- Parameters:
z – independent variable
n – terms in expansion, must have
n >= 2
- Returns:
Taylor series expansion of eᶻ centered at z = 0
- boring_math.special_functions.exponential.exp.cexp(z: complex, /, n: int = mindepth) complex¶
Exponential function good for all complex
z.Complex exp(z) has an essential singularity at infinity. If given an infinite argument, phase information is given in the returned, possibly infinite, value consistent the Python stdlib cmath.exp function.
- Parameters:
z – independent variable
n – terms in expansion, must have
n >= 2
- Returns:
Value of
eᶻwhere inf is returned whenre(z) = inf.- Raises:
ValueError – When
zis infinite butre(z)is not.