The EXPINT function returns the value of the exponential integral E_{n}(*x*).

EXPINT is based on the routine expint described in section 6.3 of *Numerical Recipes in C: The Art of Scientific Computing* (Second Edition), published by Cambridge University Press, and is used by permission.

## Examples

To compute the value of the exponential integral at the following X values:

; Define the parametric X values:

X = [1.00, 1.05, 1.27, 1.34, 1.38, 1.50]

; Compute the exponential integral of order 1:

result = EXPINT(1, X)

; Print the result:

PRINT, result

IDL prints:

0.219384 0.201873 0.141911 0.127354 0.119803 0.100020

This is the exact solution vector to six-decimal accuracy.

## Syntax

*Result* = EXPINT( *N*, *X* [, /DOUBLE] [, EPS=*value*] [, ITER=*variable*] [, ITMAX=*value*] )

## Return Value

Returns the exponential integral E_{n}(*x*).

## Arguments

### N

An integer specifying the order of E_{n}(*x*). *N* can be either a scalar or an array.

**Note: **If EXPINT is complex then only the real part is used for the computation.

### X

The value at which E_{n}(*x*) is evaluated. *X* can be either a scalar or an array.

Note: If an array is specified for both *N* and *X*, then EXPINT evaluates E_{n}(*x*) for each *N*_{i} and *X*_{i}. If either *N* or *X* is a scalar and the other an array, the scalar is paired with each array element in turn.

## Keywords

### DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic. Set this keyword to zero to return a single-precision result.

**Note: **All internal computations are done using double-precision arithmetic.

### EPS

Use this keyword to specify a number close to the desired relative error. The default value is 3.0 x 10^{-12}.

### ITER

Set this keyword equal to a named variable that will contain the actual number of iterations performed.

### ITMAX

An input integer specifying the maximum allowed number of iterations. The default value is 100000.

### Thread Pool Keywords

This routine is written to make use of IDL’s *thread pool*, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.

## Version History

4.0 |
Introduced |

5.6 |
Added ITER keyword |

## See Also

## Notes

This page has no user notes yet. Be the first one!