ERF(3M)ERF(3M) NAME erf, erff, erfcf, erfcl, erfc, derf, derfc, erfl, erfcl, qerf, qerfc - Error function and complementary error function SYNOPSIS Fortran 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) C synopsis: #include <math.h> double erf (double x); float erff(float x); long double erfl (long double x); double erfc (double x); float erfcf(float x); long double erfcl (long double x); DESCRIPTION Alternate entries exist for several routines. The following lists these routines and the ANSI standard name and the alternate entry name: ANSI standard name Alternate name erfcl qerf erfcl qerfc The erfcf functions and the erff functions are not available for programs compiled with the O32 ABI. The erf intrinsic functions return the error function of x, defined in the following: (2/sqrt(pi))integral{0tox}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. For example, if x = 10, 12 places are lost. The libraries libm.a, libmx.a, and libm43.a each contain versions of these functions. C/C++: each library contains versions of erf and erfc; however the long double-precision routines erfl and erfcl are only available in the standard math library, -lm and in -lmx. NOTES Long double operations on this system are only supported in round to nearest rounding mode (the default). The system must be in round to nearest rounding mode when calling any of the long double functions, or incorrect answers will result. RETURN VALUES Functions in the standard math library (libm.a) are referred to as -lm; versions in the mathx library (libmx.a) are referred to as -lmx, and those in the the BSD math library (libm43.a) are referred to as -ilm43. 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 -ilm43 versions to return the same argument. The -ilm43 versions never set errno. See matherr(3M) for a description of error handling for -lmx functions. SEE ALSO exp(3M), matherr(3M)