Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Mathematical Library Functionserf(3M)


NAME

 erf, erfc - error and complementary error functions

SYNOPSIS

 
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double erf(double x);
 double erfc(double x);

DESCRIPTION

 

The erf() function computes the error function of x, defined as:



 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt


The erfc() function computes 1.0 - erf(x).

RETURN VALUES

 

Upon successful completion, erf() and erfc() return the value of the error function and complementary error function, respectively.

If x is NaN, NaN is returned.

ERRORS

 

No errors will occur.

USAGE

 

The erfc() function 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.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

isnan(3M), attributes(5)


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.