next up previous index
Next: C339 Dawson's Integral Up: CERNLIB Previous: C337 Exponential Integral

C338 Exponential Integral for Complex Argument

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

Function subprograms CEXPIN and WEXPIN calculate the the exponential integral

E(z) = ∫0z t-1 (1 - e-t) dt

for complex arguments z.

The double-precision version WEXPIN is available only on computers which support a COMPLEX*16 Fortran data type.

Structure:

FUNCTION subprograms
Use Entry Names : CEXPIN, WEXPIN
Files referenced : Unit 6
External References: MTLMTR (N002), ABEND (Z035)

Usage:

In any arithmetic expression, CEXPIN(Z) or WEXPIN(Z) has the value E(Z) ,

where CEXPIN is of type COMPLEX, WEXPIN is of type COMPLEX*16, and Z has the same type as the function name.

Method:

Padé approximants are used to compute E(z) = E(x + iy) in the following (partly overlapping) regions of the z-plane:
(i) ({17}(x - 1))2+ ({15}y)2 ≤1 (x ≥- 5) ,
(ii)({115}(x + 12))2+ ({112}y)2 ≥1 (x ≥- 12) ,
(iii)({112}y)2 ≥1 (x < - 12) .

In the remaining region, consisting mainly of a strip along the negative real axis, E(z) is computed by numerical integration (which is very much slower than the evaluation of the Padé approximations).

Accuracy:

CEXPIN (except on CDC and Cray computers) has full single-precision accuracy. For most values of the argument Z, WEXPIN (and CEXPIN on CDC and Cray computers) has an accuracy of approximately two significant digits less than the machine precision.

Error handling:

Error C338.1: Numerical integration not successful (unlikely). 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. Y.L. Luke, the special functions and their approximations, v. II, (Academic Press, New York 1969) 198--199, 402--416.

C339



next up previous index
Next: C339 Dawson's Integral Up: CERNLIB Previous: C337 Exponential Integral


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