erf_re: Error functions

View source: R/utilities.R

erf_reR Documentation

Error functions

Description

Error functions

Usage

erf_re(x)

erfc_re(x)

erfc0_re(x)

erfc1_re(x)

ierf_re(x)

ierfc_re(x)

Arguments

x

numeric

Details

erf_re and erfc_re calculate the error function and the complementary error function, respectively; erfc1_re calculates the complementary error function for n=1 (see references), and erfc0_re is equivalent to erfc_re (n=0).

ierf_re and ierfc_re calculate the inverse error function and the inverse complementary error function, respectively.

Note

These generally use pnorm and qnorm; but, where necessary, RcppFaddeeva's implementation (erf, etc.) is used.

References

Error function: http://mathworld.wolfram.com/Erf.html

Inverse error function: http://mathworld.wolfram.com/InverseErf.html

Complementary error function: http://mathworld.wolfram.com/Erfc.html

Inverse complementary error function: http://mathworld.wolfram.com/InverseErfc.html

Examples

x <- seq(0,1,by=0.1)
erf_re(x)
erfc_re(x)
ierfc_re(x)

# a known identity
identical(erfc_re(Inf), 0)


abarbour/deform documentation built on Dec. 5, 2024, 1:55 p.m.