darkhistory.utilities.exp_expn¶
-
darkhistory.utilities.
exp_expn
(n, x)¶ Returns \(e^x E_n(x)\).
The exponential integral \(E_n(x)\) is defined as
\[E_n(x) \equiv \int_1^\infty dt\, \frac{e^{-xt}}{t^n}\]Circumvents overflow error in
np.exp
by expanding the exponential integral in a series to the 5th or 6th order.Parameters: - n : {1,2}
The order of the exponential integral.
- x : ndarray
The argument of the function.
Returns: - ndarray
The value of \(e^x E_n(x)\).