Functions
core/vnl/vnl_erf.h File Reference

Error Function (erf) approximations. More...

#include <vnl/vnl_gamma.h>
#include <vnl/vnl_math.h>

Go to the source code of this file.

Functions

double vnl_erf (double x)
 The Error function.
double vnl_erfc (double x)
 The Complementary Error function.
double vnl_scaled_erfc (double x)
 The Scaled Complementary Error function.

Detailed Description

Error Function (erf) approximations.

Author:
Tim Cootes, Ian Scott

Definition in file vnl_erf.h.


Function Documentation

double vnl_erf ( double  x) [inline]

The Error function.

erf(x) = (2/sqrt(pi)) Integral from 0 to x (exp(-t^2) dt)

Note:
the output ranges from -1 to 1, and vnl_erf(0) = 0.

Definition at line 15 of file vnl_erf.h.

double vnl_erfc ( double  x)

The Complementary Error function.

erfc(x) = 1 - erf(x) = 1 - (2/sqrt(pi)) Integral from 0 to x (exp(-t^2) dt) This value is useful for large x, when erf(x) ~= 1 and erfc(x) < eps.

Note:
the output ranges from 0 to 2, and vnl_erfc(0) = 1.

Definition at line 13 of file vnl_erf.cxx.

double vnl_scaled_erfc ( double  x) [inline]

The Scaled Complementary Error function.

erfc_scaled(x) = exp(x^2) * erfc(x) This value is useful for very large x, where erf and erfc returns respectively ~1 and ~0. It can be approximated by (1/sqrt(pi)) * (1/x)

Definition at line 29 of file vnl_erf.h.