Learn R Programming

NORMT3 (version 1.0.4)

wofz: Faddeeva function

Description

Computes the Faddeeva function of a complex valued argument. This function is $$\exp{-z^2}*erfc(-iz)$$ .

Usage

wofz(z)

Arguments

z

Argument of Faddeeva function

Value

The Faddeeva function, w(z)

Details

Computes the Faddeeva function of a complex valued argument. This function is $$\exp{-z^2}*erfc(-iz)$$

This function calls FORTRAN code (algorithm TOMS 680) which computes the Faddeeva function.

References

Poppe, G.P.M. and Wijers, C.M.J. (1990) More efficient computation of the complex error function. ACM Transactions on Mathematical Software, 16, 38--46.

See Also

erf erfc

Examples

Run this code
# NOT RUN {
options(digits=15)
wofz(0)
#
# Should give 1+0i
#
wofz(1)
#
# Should give 0.367879441171442+0.607157705841394i 
#
wofz(complex(re=1, im=1))
#
# Should give 0.304744205256913+0.208218938202832i 
#
# }

Run the code above in your browser using DataLab