Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.
﻿

>  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_ERF

### IMSL_ERF

IMSL_ERF

The IMSL_ERF function evaluates the real error function erf ( x ). Using a keyword, the inverse error function erf –1(x) can be evaluated.

## Syntax

Result = IMSL_ERF(x [, /DOUBLE] [, /INVERSE])

## Return Value

The value of the error function erf(x).

## Arguments

#### x

Expression for which the error function is to be evaluated.

## Keywords

#### DOUBLE

If present and nonzero, double precision is used.

#### INVERSE

Evaluates the real inverse error function erf–1(x). The inverse error function is defined only for –1 < x < 1.

## Discussion

The error function erf(x) is defined below:

All values of x are legal. The inverse error function y = erf –1(x) is such that x = erf (y).

## Examples

#### Example 1

Plot the error function over [ –3, 3 ]. The results are shown in Figure 12-1.

`x = 6 * FINDGEN(100)/99 - 3  PLOT, x, IMSL_ERF(x), XTitle = ';x', YTitle = 'erf(x)'  `

Figure 12-1: Plot of erf(x)

#### Example 2

Plot the inverse of the error function over ( –1, –1). The results are shown in Figure 12-2.

`x = 2 * FINDGEN(100)/99 - 1  PLOT, x, IMSL_ERF(x(1:98), /Inverse), XTitle = ';x', \$     YTitle = ';erf!E-1!N(x)'  `

Figure 12-2: Plot of erf–1(x)

## Version History

 6.4 Introduced

© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us