NAME
kjb_erf - Computes error function erf(x)
SYNOPSIS
#include "wrap_gsl/wrap_gsl_sf.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int kjb_erf
(
double *P_ptr,
double x
);
PARAMETERS
-
double *P_ptr
-
Pointer to where the result should be stored
-
double x
-
Value at which to evaluate erf
DESCRIPTION
This routine is a thin wrapper to GSL code that computes, if possible,
the so-called "error function," a well-known special function.
It is defined to be equal to following definite integral:
|
2 / x
erf(x) := --------- | exp( -t**2 ) dt
sqrt(pi) / 0
This has a close relationship to the CDF of the standard Normal
distribution Phi(x). Check me on this, but I believe the equation is
| Phi(x) = 0.5 (1 + erf(x / sqrt(2))).
RETURNS
If successful, the value is written to *P_ptr and this function returns
NO_ERROR. If the routine fails -- caused by the library being unavailable
during linking -- an error message is set and the return value is ERROR.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Andrew Predoehl
DOCUMENTER
Kobus Barnard
SEE ALSO
kjb_bessel_I0
,
kjb_scaled_bessel_I1
,
kjb_scaled_bessel_I0