Latest Updates
Latest Tweets
Fork me on GitHub

Special Functions

Factorial

Code Sample:

double x = SpecialFunctions.Factorial(14);
// x will now have the value 87178291200.0

double y = SpecialFunctions.Factorial(31);
// y will now have the value 8.2228386541779224E+33

Gamma

Commonly used gamma-related functions in literature:

GAMMA(a) = int(exp(-t)t^(a-1), t=0..infinity)
gamma(a,x) = int(exp(-t)t^(a-1),t=0..x)
Gamma(a,x) = int(exp(-t)t^(a-1),t=x..infinity)
P(a,x) = gamma(a,x)/GAMMA(a)
Q(a,x) = Gamma(a,x)/GAMMA(a)

Digamma (Psi)

Euler Beta

Error Function

  • Error Function: Erf
  • Complementary Error Function: Erfc
  • Inverse Error Function: ErfInv
  • Inverse Complementary Error Function: ErfcInv

Code Sample:

double x = 0.9;
double res = SpecialFunctions.Erf(x);
// res will now have the value 0.7969082124

Logistic (Sigmoid)

  • Logistic Function: Logistic
  • Logit Function (inverse of Logistic): Logit

Harmonic Numbers

Various Numerically Stable Functions