erf.3m (2010 09)

e
erf(3M) erf(3M)
NAME
erf( ), erff( ), erfl( ), erfw( ), erfq( ), erfc( ), erfcf( ), erfcl( ), erfcw( ), erfcq( ) - error function and complemen-
tary error functions
SYNOPSIS
#include <math.h>
double erf(double x);
double erfc(double x);
HP Integrity Server Only
float erff(float x);
long double erfl(long double x);
extended erfw(extended x);
quad erfq(quad x);
float erfcf(float x);
long double erfcl(long double x);
extended erfcw(extended x);
quad erfcq(quad x);
DESCRIPTION
erf() returns the error function of x, defined as:
(2/
sqrt(pi)) *
(integral with respect to t from 0 to x of (exp(pow(-t,2))))
erfc() returns the complementary value, 1.0
erf(x). It prevents the extreme loss of relative accu-
racy if
erf(x) is called for a large x and the result is subtracted from 1.0. (For example, for x =5,
twelve decimal places are lost.)
Integrity Server Only
erff() and erfcf() are float versions of erf() and erfc() respectively; they take a
float
argument and return a float result.
erfl() and erfcl() are long double versions of erf() and erfc() respectively; they take a
long double argument and return a long double result.
erfw() and erfcw() are extended versions of erf() and erfc() respectively; they take an
extended argument and return an extended result.
erfq() and erfcq() are equivalent to erfl() and erfcl() respectively on HP-UX systems.
USAGE
To use these functions compile either with the default
-Ae option or with the -Aa and
-D_HPUX_SOURCE options.
To use (for Integrity servers)
erfw(), erfcw(), erfq(),orerfcq(), compile also with the
-fpwidetypes option.
To use any of these functions, make sure your program includes
<math.h>, and link in the math library
by specifying -lm on the compiler or linker command line.
For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site:
http://www.hp.com/go/fp.
RETURN VALUE
erf(±0) returns ±0.
If x is +INFINITY,
erf() returns 1.0.
If x is INFINITY,
erf() returns 1.0.
If x is +INFINITY,
erfc() returns zero.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)