Learn R Programming

NORMT3 (version 1.0.4)

erf: Error function

Description

Computes the error function of a (possibly) complex valued argument. This function is 1-erfc(z).

Usage

erf(z)

Arguments

z

Argument of error function

Value

The error function of z

Details

Computes the error function of a (possibly) complex valued argument by computing the complementary error function and subtracting the answer from 1.

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

erfc

Examples

Run this code
# NOT RUN {
erf(0)
#
# Should give 0
#
erf(1)
#
# Should give 0.8427008+0i
#
erf(complex(re=1, im=1))
#
# Should give 1.316151+0.1904535i
#
# }

Run the code above in your browser using DataLab