Class ArithMath
Provides standard mathematical functions for the library types.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: Arithmetica.dll
Syntax
public static class ArithMath
Fields
ComplexAcosFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcosFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAcoshFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcoshFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAcotFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcotFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAcothFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcothFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAcscFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcscFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAcschFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAcschFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAsecFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAsecFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAsechFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAsechFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAsinFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAsinFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAsinhFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAsinhFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAtanFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAtanFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexAtanhFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexAtanhFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCosFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCosFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCoshFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCoshFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCotFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCotFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCothFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCothFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCscFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCscFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexCschFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexCschFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexSecFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexSecFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexSechFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexSechFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexSinFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexSinFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexSinhFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexSinhFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexTanFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexTanFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
ComplexTanhFunction
Declaration
public static readonly ArithMath.UnaryFunction<Complex> ComplexTanhFunction
Field Value
ArithMath.UnaryFunction<Complex>
|
DoubleAbsFunction
Absolute value function for double-precision floating point numbers.
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAbsFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcosFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcosFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcoshFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcoshFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcotFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcotFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcothFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcothFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcscFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcscFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAcschFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAcschFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAsecFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAsecFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAsechFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAsechFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAsinFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAsinFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAsinhFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAsinhFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAtanFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAtanFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleAtanhFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleAtanhFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCosFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCosFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCoshFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCoshFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCotFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCotFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCothFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCothFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCscFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCscFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleCschFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleCschFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleSecFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleSecFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleSechFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleSechFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleSinFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleSinFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleSinhFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleSinhFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleSqrtFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleSqrtFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleTanFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleTanFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
DoubleTanhFunction
Declaration
public static readonly ArithMath.UnaryFunction<double> DoubleTanhFunction
Field Value
ArithMath.UnaryFunction<System.Double>
|
EpsilonD
Epsilon, a fairly small value for a double precision floating point
Declaration
public const double EpsilonD = 8.8817841970012523E-16
Field Value
System.Double
|
EpsilonF
Epsilon, a fairly small value for a single precision floating point
Declaration
public const float EpsilonF = 4.76837158E-07F
Field Value
System.Single
|
FloatAbsFunction
Absolute value function for single-precision floating point numbers.
Declaration
public static readonly ArithMath.UnaryFunction<float> FloatAbsFunction
Field Value
ArithMath.UnaryFunction<System.Single>
|
HalfPI
The value of PI/2.
Declaration
public const double HalfPI = 1.5707963267948966
Field Value
System.Double
|
IntAbsFunction
Absolute value function for integers.
Declaration
public static readonly ArithMath.UnaryFunction<int> IntAbsFunction
Field Value
ArithMath.UnaryFunction<System.Int32>
|
PI
The value of PI.
Declaration
public const double PI = 3.1415926535897931
Field Value
System.Double
|
SquaredPI
The value of (PI*PI).
Declaration
public const double SquaredPI = 9.869604401089358
Field Value
System.Double
|
TwoPI
The value of (2 * PI).
Declaration
public const double TwoPI = 6.2831853071795862
Field Value
System.Double
|
Methods
Abs(Double)
Calculates the absolute value of a double-precision floating point number.
Declaration
public static double Abs(double x)
Parameters
System.Double
x
A double-precision floating point number. |
Returns
System.Double
The absolute value of |
Abs(Double[])
Creates a new
Declaration
public static double[] Abs(double[] array)
Parameters
System.Double[]
array
An array of double-precision floating point values. |
Returns
System.Double[]
A new |
Abs(Int32)
Calculates the absolute value of an integer.
Declaration
public static int Abs(int x)
Parameters
System.Int32
x
An integer. |
Returns
System.Int32
The absolute value of |
Abs(Int32[])
Creates a new array of integers whose element values are the result of applying the absolute function on the elements of the given integers array.
Declaration
public static int[] Abs(int[] array)
Parameters
System.Int32[]
array
An array of integers. |
Returns
System.Int32[]
A new array of integers whose values are the result of applying the absolute function to each element in |
Abs(Single)
Calculates the absolute value of a single-precision floating point number.
Declaration
public static float Abs(float x)
Parameters
System.Single
x
A single-precision floating point number. |
Returns
System.Single
The absolute value of |
Abs(Single[])
Creates a new
Declaration
public static float[] Abs(float[] array)
Parameters
System.Single[]
array
An array of single-precision floating point values. |
Returns
System.Single[]
A new |
Acos(Complex)
Acos(Double)
Declaration
public static double Acos(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Acosh(Complex)
Acosh(Double)
Declaration
public static double Acosh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Acot(Complex)
Acot(Double)
Declaration
public static double Acot(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Acoth(Complex)
Acoth(Double)
Declaration
public static double Acoth(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Acsc(Complex)
Acsc(Double)
Declaration
public static double Acsc(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Acsch(Complex)
Acsch(Double)
Declaration
public static double Acsch(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
ApproxEquals(Double, Double)
Tests whether two double-precision floating point numbers are approximately equal using default tolerance value.
Declaration
public static bool ApproxEquals(double a, double b)
Parameters
System.Double
a
A double-precision floating point number. |
System.Double
b
A double-precision floating point number. |
Returns
System.Boolean
true if the two vectors are approximately equal; otherwise, false. |
ApproxEquals(Double, Double, Double)
Tests whether two double-precision floating point numbers are approximately equal given a tolerance value.
Declaration
public static bool ApproxEquals(double a, double b, double tolerance)
Parameters
System.Double
a
A double-precision floating point number. |
System.Double
b
A double-precision floating point number. |
System.Double
tolerance
The tolerance value used to test approximate equality. |
Returns
System.Boolean
true if the two vectors are approximately equal; otherwise, false. |
ApproxEquals(Single, Single)
Tests whether two single-precision floating point numbers are approximately equal using default tolerance value.
Declaration
public static bool ApproxEquals(float a, float b)
Parameters
System.Single
a
A single-precision floating point number. |
System.Single
b
A single-precision floating point number. |
Returns
System.Boolean
true if the two vectors are approximately equal; otherwise, false. |
ApproxEquals(Single, Single, Single)
Tests whether two single-precision floating point numbers are approximately equal given a tolerance value.
Declaration
public static bool ApproxEquals(float a, float b, float tolerance)
Parameters
System.Single
a
A single-precision floating point number. |
System.Single
b
A single-precision floating point number. |
System.Single
tolerance
The tolerance value used to test approximate equality. |
Returns
System.Boolean
true if the two vectors are approximately equal; otherwise, false. |
Asec(Complex)
Asec(Double)
Declaration
public static double Asec(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Asech(Complex)
Asech(Double)
Declaration
public static double Asech(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Asin(Complex)
Asin(Double)
Declaration
public static double Asin(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Asinh(Complex)
Asinh(Double)
Declaration
public static double Asinh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Atan(Complex)
Atan(Double)
Declaration
public static double Atan(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Atanh(Complex)
Atanh(Double)
Declaration
public static double Atanh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Clamp(Double, Double)
Clamp a value
to calmpedValue
using the default tolerance value.
Declaration
public static double Clamp(double value, double calmpedValue)
Parameters
System.Double
value
The value to clamp. |
System.Double
calmpedValue
The clamped value. |
Returns
System.Double
Returns the clamped value. result = (EpsilonD > Abs(value-calmpedValue)) ? calmpedValue : value; |
Remarks
EpsilonD is used for tolerance.
Clamp(Double, Double, Double)
Clamp a value
to calmpedValue
if it is withon the tolerance
range.
Declaration
public static double Clamp(double value, double calmpedValue, double tolerance)
Parameters
System.Double
value
The value to clamp. |
System.Double
calmpedValue
The clamped value. |
System.Double
tolerance
The tolerance value. |
Returns
System.Double
Returns the clamped value. result = (tolerance > Abs(value-calmpedValue)) ? calmpedValue : value; |
Clamp(Single, Single)
Clamp a value
to calmpedValue
using the default tolerance value.
Declaration
public static float Clamp(float value, float calmpedValue)
Parameters
System.Single
value
The value to clamp. |
System.Single
calmpedValue
The clamped value. |
Returns
System.Single
Returns the clamped value. result = (EpsilonF > Abs(value-calmpedValue)) ? calmpedValue : value; |
Remarks
EpsilonF is used for tolerance.
Clamp(Single, Single, Single)
Clamp a value
to calmpedValue
if it is withon the tolerance
range.
Declaration
public static float Clamp(float value, float calmpedValue, float tolerance)
Parameters
System.Single
value
The value to clamp. |
System.Single
calmpedValue
The clamped value. |
System.Single
tolerance
The tolerance value. |
Returns
System.Single
Returns the clamped value. result = (tolerance > Abs(value-calmpedValue)) ? calmpedValue : value; |
Cos(Complex)
Cos(Double)
Declaration
public static double Cos(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Cos(Single)
Declaration
public static float Cos(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Cosh(Complex)
Cosh(Double)
Declaration
public static double Cosh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Cot(Complex)
Cot(Double)
Declaration
public static double Cot(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Cot(Single)
Declaration
public static float Cot(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Coth(Complex)
Coth(Double)
Declaration
public static double Coth(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Csc(Complex)
Csc(Double)
Declaration
public static double Csc(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Csc(Single)
Declaration
public static float Csc(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Csch(Complex)
Csch(Double)
Declaration
public static double Csch(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Sec(Complex)
Sec(Double)
Declaration
public static double Sec(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Sec(Single)
Declaration
public static float Sec(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Sech(Complex)
Sech(Double)
Declaration
public static double Sech(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Sin(Complex)
Sin(Double)
Declaration
public static double Sin(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Sin(Single)
Declaration
public static float Sin(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Sinh(Complex)
Sinh(Double)
Declaration
public static double Sinh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Swap<T>(ref T, ref T)
Declaration
public static void Swap<T>(ref T lhs, ref T rhs)
Parameters
T
lhs
|
T
rhs
|
Type Parameters
T
|
Tan(Complex)
Tan(Double)
Declaration
public static double Tan(double value)
Parameters
System.Double
value
|
Returns
System.Double
|
Tan(Single)
Declaration
public static float Tan(float value)
Parameters
System.Single
value
|
Returns
System.Single
|
Tanh(Complex)
Tanh(Double)
Declaration
public static double Tanh(double value)
Parameters
System.Double
value
|
Returns
System.Double
|