erf(3F)
erf, erfc, derf, derfc, qerf, qerfc - error function and complementary error function
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME erf, erfc, derf, derfc, qerf, qerfc - error function and complementary error function SYNOPSIS real*4 r1, r2, erf real*8 dp1, dp2, derf real*16 cd1, cd2, qerf r2 = erf(r1) dp2 = derf(dp1) cd2 = qerf(cd1) real*4 r1, r2, erfc real*8 dp1, dp2, derfc real*16 cd1, cd2, qerfc r2 = erfc(r1) dp2 = derfc(dp1) cd2 = qerfc(cd1) DESCRIPTION erf returns the error function of x, defined as (2/sqrt(pi)) integral{0 to x} of (e ** -t **2) dt. erfc, which returns 1.0 - erf(x), is provided because of the extreme loss of relative accuracy if erf(x) is called for large x and the result subtracted from 1.0 (e.g., for x = 10, 12 places are lost). The standard math library libm.a, libmx.a, and libm43.a each contain versions of these functions. DIAGNOSTICS In the diagnostics below, functions in the standard math library libm.a, are referred to as -lm versions, those in math library libmx.a are referred to as -lmx versions, and those in the the BSD math library libm43.a are referred to as -lm43 versions. The -lm and -lmx versions always return the default Quiet NaN and set errno to EDOM when a NaN is used as an argument. A NaN argument usually causes the -lm43 versions to return the same argument. The -lm43 versions never set errno. See matherr(3M) for a description of error handling for -lmx functions. SEE ALSO exp(3M), matherr(3M)