Exponential functions¶
Floating point special functions about a point.
- boring_math.special_functions.exponential.exp.exp0(x: float, /, n: int = mindepth) float¶
Partially factored Taylor expansion of exp about
x = 0.Note
Best 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¶
Exponential function good for all floating point x.
- 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¶
Partially factored Taylor expansion of exp about z = 0.
Note
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.
Note
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.