Class Special
Set of special mathematic functions.
Inheritance
System.Object
Special
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public static class Special : object
Methods
View Source
Acosec(Double)
Declaration
public static double Acosec(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Acosech(Double)
Inverse hyperbolic cosecant.
Declaration
public static double Acosech(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Acosh(Double)
Declaration
public static double Acosh(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Acotan(Double)
Declaration
public static double Acotan(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Acotanh(Double)
Inverse hyperbolic cotangent.
Declaration
public static double Acotanh(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Asec(Double)
Declaration
public static double Asec(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Asech(Double)
Inverse hyperbolic secant.
Declaration
public static double Asech(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Asinh(Double)
Declaration
public static double Asinh(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Atanh(Double)
Inverse hyperbolic tangent.
Declaration
public static double Atanh(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Binomial(Double, Double)
Computes the binomial coefficients C(n,k).
Declaration
public static double Binomial(double n, double k)
Parameters
Type |
Name |
Description |
System.Double |
n |
|
System.Double |
k |
|
Returns
Type |
Description |
System.Double |
|
View Source
Binomial(Int32, Int32)
Computes the binomial coefficients C(n,k).
Declaration
public static double Binomial(int n, int k)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
System.Int32 |
k |
|
Returns
Type |
Description |
System.Double |
|
View Source
BSpline(Int32, Double)
Computes the Basic Spline of order n
Declaration
public static double BSpline(int n, double x)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Cosec(Double)
Declaration
public static double Cosec(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Cosech(Double)
Declaration
public static double Cosech(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Cotan(Double)
Declaration
public static double Cotan(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Cotanh(Double)
Declaration
public static double Cotanh(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Epslon(Double)
Estimates unit round-off in quantities of size x.
Declaration
public static double Epslon(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Erf(Double)
Error function of the specified value.
Declaration
public static double Erf(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Erfc(Double)
Complementary error function of the specified value.
Declaration
public static double Erfc(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
|
Returns
Type |
Description |
System.Double |
|
View Source
Expm1(Double)
Compute exp(x) - 1 without loss of precision for small values of x.
Declaration
public static double Expm1(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Factorial(Double)
Returns the extended factorial definition of a real number.
Declaration
public static double Factorial(double n)
Parameters
Type |
Name |
Description |
System.Double |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
Factorial(Int32)
Computes the factorial of a number (n!)
Declaration
public static double Factorial(int n)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
Ierf(Double)
Declaration
public static double Ierf(double y)
Parameters
Type |
Name |
Description |
System.Double |
y |
|
Returns
Type |
Description |
System.Double |
|
View Source
Ierfc(Double)
Declaration
public static double Ierfc(double y)
Parameters
Type |
Name |
Description |
System.Double |
y |
|
Returns
Type |
Description |
System.Double |
|
View Source
Log1m(Double)
Computes log(1-x) without losing precision for small values of x.
Declaration
public static double Log1m(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Log1p(Double)
Computes log(1+x) without losing precision for small values of x.
Declaration
public static double Log1p(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Log1pexp(Double)
Computes log(1 + exp(x)) without losing precision.
Declaration
public static double Log1pexp(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogBinomial(Double, Double)
Computes the log binomial Coefficients Log[C(n,k)].
Declaration
public static double LogBinomial(double n, double k)
Parameters
Type |
Name |
Description |
System.Double |
n |
|
System.Double |
k |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogBinomial(Int32, Int32)
Computes the log binomial Coefficients Log[C(n,k)].
Declaration
public static double LogBinomial(int n, int k)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
System.Int32 |
k |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogDiff(Double, Double)
Computes x + y without losing precision using ln(x) and ln(y).
Declaration
public static double LogDiff(double lnx, double lny)
Parameters
Type |
Name |
Description |
System.Double |
lnx |
|
System.Double |
lny |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogFactorial(Double)
Returns the log factorial of a number (ln(n!))
Declaration
public static double LogFactorial(double n)
Parameters
Type |
Name |
Description |
System.Double |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogFactorial(Int32)
Returns the log factorial of a number (ln(n!))
Declaration
public static double LogFactorial(int n)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogSum(Double, Double)
Computes x + y without losing precision using ln(x) and ln(y).
Declaration
public static double LogSum(double lnx, double lny)
Parameters
Type |
Name |
Description |
System.Double |
lnx |
|
System.Double |
lny |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogSum(Double[])
Computes x + y without losing precision using ln(x) and ln(y).
Declaration
public static double LogSum(double[] values)
Parameters
Type |
Name |
Description |
System.Double[] |
values |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogSum(Single, Single)
Computes x + y without losing precision using ln(x) and ln(y).
Declaration
public static double LogSum(float lnx, float lny)
Parameters
Type |
Name |
Description |
System.Single |
lnx |
|
System.Single |
lny |
|
Returns
Type |
Description |
System.Double |
|
View Source
LogSumExp(Double[])
Computes sum(x) without losing precision using ln(x_0) ... ln(x_n).
Declaration
public static double LogSumExp(this double[] array)
Parameters
Type |
Name |
Description |
System.Double[] |
array |
|
Returns
Type |
Description |
System.Double |
|
View Source
P1evl(Double, Double[], Int32)
Evaluates polynomial of degree N with assumption that coef[N] = 1.0
Declaration
public static double P1evl(double x, double[] coef, int n)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
System.Double[] |
coef |
|
System.Int32 |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
Polevl(Double, Double[], Int32)
Evaluates polynomial of degree N
Declaration
public static double Polevl(double x, double[] coef, int n)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
System.Double[] |
coef |
|
System.Int32 |
n |
|
Returns
Type |
Description |
System.Double |
|
View Source
Sec(Double)
Declaration
public static double Sec(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Sech(Double)
Declaration
public static double Sech(double x)
Parameters
Type |
Name |
Description |
System.Double |
x |
|
Returns
Type |
Description |
System.Double |
|
View Source
Sign(Double, Double)
Returns a
with the sign of b
.
Declaration
public static double Sign(double a, double b)
Parameters
Type |
Name |
Description |
System.Double |
a |
|
System.Double |
b |
|
Returns
Type |
Description |
System.Double |
If B > 0 then the result is ABS(A), else it is -ABS(A).
|
View Source
Softmax(Double[])
Computes the Softmax function (also known as normalized Exponencial
function) that "squashes"a vector or arbitrary real values into a
vector of real values in the range (0, 1) that add up to 1.
Declaration
public static double[] Softmax(double[] input)
Parameters
Type |
Name |
Description |
System.Double[] |
input |
The real values to be converted into the unit interval.
|
Returns
Type |
Description |
System.Double[] |
A vector with the same number of dimensions as input
but where values lie between 0 and 1.
|
View Source
Softmax(Double[], Double[])
Computes the Softmax function (also known as normalized Exponencial
function) that "squashes"a vector or arbitrary real values into a
vector of real values in the range (0, 1) that add up to 1.
Declaration
public static double[] Softmax(double[] input, double[] result)
Parameters
Type |
Name |
Description |
System.Double[] |
input |
The real values to be converted into the unit interval.
|
System.Double[] |
result |
The location where to store the result of this operation.
|
Returns
Type |
Description |
System.Double[] |
A vector with the same number of dimensions as input
but where values lie between 0 and 1.
|