The OpenD Programming Language

mir.math.func.normal

Members

Functions

erfc
T erfc(T a)

Complementary error function

erfce
T erfce(T x)

Exponentially scaled erfc function exp(x^2) erfc(x) valid for x > 1. Use with ndtrl and expx2l.

expx2
T expx2(T x_, int sign)

Exponential of squared argument

normalCDF
T normalCDF(T a)
T normalCDF(T x, T mean, T stdDev)

Computes the normal distribution cumulative distribution function (CDF). The normal (or Gaussian, or bell-shaped) distribution is defined as: normalDist(x) = 1/√ &pi; $(INTEGRAL -$(INFINITY), x) exp( - t2/2) dt = 0.5 + 0.5 * erf(x/sqrt(2)) = 0.5 * erfc(- x/sqrt(2)) To maintain accuracy at high values of x, use normalCDF(x) = 1 - normalCDF(-x). Accuracy: Within a few bits of machine resolution over the entire range. References: http://www.netlib.org/cephes/ldoubdoc.html, G. Marsaglia, "Evaluating the Normal Distribution", Journal of Statistical Software <b>11</b>, (July 2004).

normalInvCDF
T normalInvCDF(T p)
T normalInvCDF(T p, T mean, T stdDev)
normalPDF
T normalPDF(T z)
T normalPDF(T x, T mean, T stdDev)

Variables

MAXLOG
enum T MAXLOG(T);
MINLOG
enum T MINLOG(T);
SQRT2PI
enum real SQRT2PI;
SQRT2PIINV
enum real SQRT2PIINV;

Meta