next up previous index
Next: C338 Exponential Integral Up: CERNLIB Previous: C336 Sine and

C337 Exponential Integral

Routine ID: C337
Author(s): K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 07.12.1970
Language: FortranRevised: 15.03.1993

Function subprograms REXPIN and DEXPIN calculate the exponential integral

E1(x) = -Ei(-x) = ∫x&inf;{e-tt}dt

for real arguments x. For x<0, the real part of the principal value of the integral is taken.

On CDC and Cray computers, the double-precision versions DEXPIN and DEXPIE are not available.

Structure:

FUNCTION subprograms
User Entry Names: REXPIN, REXPIE, DEXPIN, DEXPIE
Obsolete User Entry Names: EXPINT REXPIN
Files Referenced: Unit 6
External References: MTLMTR (N002), ABEND (Z035)

Usage:

In any arithmetic expression, REXPIN(X) or DEXPIN(X) has the value E1(X) ,
REXPIE(X) or DEXPIE(X) has the value eX E1(X) ,

where REXPIN and REXPIE are of type REAL, DEXPIN and DEXPIE are of type DOUBLE PRECISION, and X has the same type as the function name.

Method:

Polynomial and rational approximations.

Accuracy:

REXPIN and REXPIE (except on CDC and Cray computers) have full single-precision accuracy. For most values of the argument X, DEXPIN, DEXPIE (and REXPIN, REXPIE on CDC and Cray computers) have an accuracy of approximately one significant digit less than the machine precision.

Error handling:

Error C337.1: X=0 . The function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. W.J. Cody and H.C. Thatcher,Jr., Rational Chebyshev approximations for the exponential integral E1(x) , Math. Comp. 22 (1968) 641--649.
  2. W.J. Cody and H.C. Thatcher,Jr., Chebyshev approximations for the exponential integral Ei(x), Math. Comp. 23 (1969) 289--303.

C338



next up previous index
Next: C338 Exponential Integral Up: CERNLIB Previous: C336 Sine and


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995