Computes the principal value of the exponential integral.
- x (Double)
- The argument, which must be non-negative.
The value of Ei(x).
The function Ei(x) appears in the evaluation of some indefinite integrals involving exponents and in number theory in the approximation li(x) = Ei(ln x) to the cumulative distribution of primes.
It is related to the real part of the exponential integral for negative arguments by E1(-x ± iε) = -Ei(x) ∓ iπ.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | x is negative. |