Special Functions
Factorial
- Factorial: Factorial
- Logarithmic Factorial: FactorialLn
- Binomial Coefficient: Binomial
- Logarithmic Binomial Coefficient: BinomialLn
- Multinomial Coefficient: Multinomial
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)
- Gamma: Gamma = a -> GAMMA(a)
- Logarithmic Gamma: GammaLn = a -> ln(abs(GAMMA(a))
- Lower Incomplete Gamma (Unregularized): GammaLowerIncomplete = (a,x) -> gamma(a,x)
- Upper Incomplete Gamma (Unregularized): GammaUpperIncomplete = (a,x) -> Gamma(a,x)
- Lower Incomplete Regularized Gamma: GammaLowerRegularized = (a,x) -> P(a,x)
- Upper Incomplete Regularized Gamma: GammaUpperRegularized = (a,x) -> Q(a,x)
Digamma (Psi)
- Digamma (Psi): DiGamma
- Inverse Digamma: DiGammaInv
Euler Beta
- Beta: Beta
- Logarithmic Beta: BetaLn
- Lower Incomplete Beta (Unregularized): BetaIncomplete
- Lower Incomplete Regularized Beta: BetaRegularized
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)
Harmonic Numbers
- t'th Harmonic Number: Harmonic
- Generalized Harmonic Number of order n of m: GeneralHarmonic
Various Numerically Stable Functions
- x -> exp(x)-1: ExponentialMinusOne
- (a,b) -> sqrt(a^2 + b^2): Hypotenuse (also for complex numbers)



