next up previous index
Next: C336 Sine and Up: CERNLIB Previous: C334 Incomplete Gamma

C335 Complex Error Function

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

Function subprograms CWERF and WWERF calculate the complex error function

w(z) = e-z2[1+{2iπ}∫0zet2dt] = e-z2[1-erf (-iz)] = e-z2erfc (-iz)

for complex arguments z, where i = -1 .

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

Structure:

FUNCTION subprograms
User Entry Names: CWERF, WWERF

Usage:

In any arithmetic expression, CWERF(Z) or WWERF(Z) has the value w(Z) ,

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

Method:

The method is described in Ref. 2.

Accuracy:

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

Notes:

This subprogram is a modified version of the algorithm presented in Ref. 1.

References:

  1. W. Gautschi, Algorithm 363, Complex Error Function, Collected Algorithms from CACM (1969).
  2. W. Gautschi, Efficient Computation of the Complex Error Function, SIAM J. Numer. Anal. 7 (1970) 187--198.
  3. K.S. Kölbig, Certification of Algorithm 363 Complex Error Function, Comm. ACM 15 (1972) 465--466.

C336


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