naginterfaces.library.specfun.integral_exp¶
- naginterfaces.library.specfun.integral_exp(x)[source]¶
integral_exp
returns the value of the exponential integral .For full information please refer to the NAG Library document for s13aa
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s13aaf.html
- Parameters
- xfloat
The argument of the function.
- Returns
- e1xfloat
The value of the exponential integral .
- Raises
- NagValueError
- (errno )
On entry, and the constant . The evaluation has been abandoned due to the likelihood of overflow.
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
On entry, and the function is infinite.
- Notes
integral_exp
calculates an approximate value forusing 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_exp
exits with an error and returns the largest representable machine number.For ,
where .
For ,
where .
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_exp
guards 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.
- References
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