This function evaluates the exponential integral for arguments greater than zero and the Cauchy principal value for arguments less than zero.
EI — Function value. (Output)
X — Argument for which the function value is desired. (Input)
Generic: EI (X)
Specific: The specific interface names are S_EI and D_EI.
Single: EI (X)
Double: The double precision function name is DEI.
The exponential integral, Ei(x), is defined to be
The argument x must be large enough to insure that the asymptotic formula ex/x does not underflow, and x must not be so large that ex overflows.
If principal values are used everywhere, then for all X, EI(X) = −E1(−X) and E1(X) = −EI(−X).
In this example, Ei(1.15) is computed and printed.
USE EI_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL VALUE, X
! Compute
X = 1.15
VALUE = EI(X)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) X, VALUE
99999 FORMAT (' EI(', F6.3, ') = ', F6.3)
END
EI( 1.150) = 2.304
PHONE: 713.784.3131 FAX:713.781.9260 |