integral_expreturns the value of the exponential integral .
For full information please refer to the NAG Library document for s13aa
The argument of the function.
The value of the exponential integral .
- (errno )
On entry, and the constant . The evaluation has been abandoned due to the likelihood of overflow.
- (errno )
On entry, and the function is infinite.
integral_expcalculates an approximate value for
using Chebyshev expansions, where is real. For , the real part of the principal value of the integral is taken. The value is infinite, and so, when ,
integral_expexits with an error and returns the largest representable machine number.
In both cases, .
For , the approximation is based on expansions proposed by Cody and Thatcher Jr. (1969). Precautions are taken to maintain good relative accuracy in the vicinity of , which corresponds to a simple zero of Ei().
integral_expguards against producing underflows and overflows by using the argument . To guard against overflow, if the function terminates and returns the negative of the largest representable machine number. To guard against underflow, if the result is set directly to zero.
NIST Digital Library of Mathematical Functions
Cody, W J and Thatcher Jr., H C, 1969, Rational Chebyshev approximations for the exponential integral Ei , Math. Comp. (23), 289–303