Exponential functions¶
Exponential function
Complex and real valued implementations of the exponential function.
- boring_math.special_functions.exponential.exp.exp0(x: float, /, n: int = min_depth) float¶
Real exponential function about x = 0
Best if -1 <= x <= 1 for n >= 22.
- param x:
Independent variable.
- param n:
Terms in expansion, must have n >= 2.
- returns:
Value of eˣ expanded about x = 0.
- boring_math.special_functions.exponential.exp.exp(x: float, /, n: int = min_depth) float¶
Real exponential function about x = 0.
Valid for extended value floating point arguments.
- param x:
Independent variable.
- param n:
Terms in expansion, must have n >= 2.
- returns:
Value of eˣ otherwise nan if x = nan.
- boring_math.special_functions.exponential.exp.cexp0(z: complex, /, n: int = min_depth) complex¶
Complex exponential function about z = 0
- param z:
Independent variable.
- param n:
Terms in expansion, must have n >= 2.
- returns:
Value of eᶻ centered at z = 0
Tip
Best if |z| <= 1 and n >= 22.
- boring_math.special_functions.exponential.exp.cexp(z: complex, /, n: int = min_depth) complex¶
Exponential function for all complex z.
- param z:
Independent variable.
- param n:
Terms in expansion, must have n >= 2.
- returns:
Value of eᶻ.
- raises ValueError:
When z is infinite but re(z) is not.
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 with Python’s stdlib cmath.exp implementation.