CERFE

This function evaluates a scaled function related to ERFC.

Function Return Value

CERFE — Complex function value. (Output)

Required Arguments

Z — Complex argument for which the function value is desired. (Input)

FORTRAN 90 Interface

Generic: CERFE (Z)

Specific: The specific interface names are C_CERFE and Z_CERFE.

FORTRAN 77 Interface

Complex: CERFE (Z)

Double complex:The double complex function name is ZERFE.

Description

Function CERFE is defined to be

 

Let b = AMACH(2) be the largest floating‑point number. The argument z must satisfy

 

or else the value returned is zero. If the argument z does not satisfy (z)2(z)2 log b, then b is returned. All other arguments are legal (Gautschi 1969, 1970).

Example

In this example, CERFE(2.5 + 2.5i) is computed and printed.

 

USE CERFE_INT

USE UMACH_INT

 

IMPLICIT NONE

! Declare variables

INTEGER NOUT

COMPLEX VALUE, Z

! Compute

Z = (2.5, 2.5)

VALUE = CERFE(Z)

! Print the results

CALL UMACH (2, NOUT)

WRITE (NOUT,99999) Z, VALUE

99999 FORMAT (' CERFE(', F6.3, ',', F6.3, ') = (', &

F6.3, ',', F6.3, ')')

END

Output

 

CERFE( 2.500, 2.500) = ( 0.117, 0.108)