Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

erf, erff, erfl, erfc, erfcf, erfcl - error and complementary error functions

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double erf(double x);
C11
float erff(float x);
long double erfl(long double x); (End)

double erfc(double x);
C11
float erfcf(float x);
long double erfcl(long double x); (End)

Description

erf(), erff() and erfl() compute the error function of the floating-point number x. The error function is defined as follows:

erfc(), erfcf() and erfcl() compute the complementary error function of the floating-point number x:

1.0 - erf( x ), 1.0 - erff( x ) and 1.0 - erfl( x ).

Return val.

Value of the error function of x

if erf(), erff() resp. erfl() was completed successfully.

Value of the complementary error function of x

if erfc(), erfcf() resp. erfcl() was completed successfully.

Notes

These functions are provided due to the resulting loss of accuracy when the error functions erf(), erff() resp. erfl()are called for large values of x .

See also

math.h.