Defines some mathematical functions to be used in derived classes. In addition to functions defined in the M class, functions are defined under other names, and some additional functions are also defined.
More...
|
static double | Abs (double a) |
| Absolute value. More...
|
|
static double | Sign (double a) |
| Returns a value indicating the sign of a number. More...
|
|
static double | sgn (double a) |
| Returns a value indicating the sign of a number. More...
|
|
static double | Ceiling (double a) |
| Returns the smallest integral value that is greater than or equal to the specified decimal number. More...
|
|
static double | ceiling (double a) |
| Returns the smallest integral value that is greater than or equal to the specified decimal number. More...
|
|
static double | Floor (double a) |
| Returns the largest integer less than or equal to the specified number. More...
|
|
static double | Truncate (double a) |
| Calculates the integral part of a specified double-precision floating-point number. More...
|
|
static double | truncate (double a) |
| Calculates the integral part of a specified number. More...
|
|
static double | Min (double a, double b) |
| Smallest of two numbers. More...
|
|
static double | Max (double a, double b) |
| Largest of two numbers. More...
|
|
static double | Min (double a, double b, double c) |
| Smallest of three numbers. More...
|
|
static double | Max (double a, double b, double c) |
| Largest of three numbers. More...
|
|
static double | Min (double a, double b, double c, double d) |
| Smallest of four numbers. More...
|
|
static double | Max (double a, double b, double c, double d) |
| Largest of four numbers. More...
|
|
static double | Min (double a, double b, double c, double d, double e) |
| Smallest of five numbers. More...
|
|
static double | Max (double a, double b, double c, double d, double e) |
| Largest of five numbers. More...
|
|
static double | Min (double a, double b, double c, double d, double e, double f) |
| Smallest of six numbers. More...
|
|
static double | Max (double a, double b, double c, double d, double e, double f) |
| Largest of six numbers. More...
|
|
static double | Min (params double[] numbers) |
| Minimal of the specified values. More...
|
|
static double | Max (params double[] numbers) |
| Maximal of the specified values. More...
|
|
static double | Sum (params double[] numbers) |
| Sum of the specified values. More...
|
|
static double | Product (params double[] numbers) |
| Product of the specified values. More...
|
|
static double | product (params double[] numbers) |
| Product of the specified values. More...
|
|
static double | Pow (double a, double b) |
| Returns a specified number raised to the specified power. More...
|
|
static double | Sqr (double a) |
| Returns the square of a specified number. More...
|
|
static double | Cube (double a) |
| Returns the square of a specified number. More...
|
|
static double | Pow2 (double x) |
| Square. More...
|
|
static double | Pow3 (double x) |
| 3rd power. More...
|
|
static double | Pow4 (double x) |
| 4th power. More...
|
|
static double | Pow5 (double x) |
| 5th power. More...
|
|
static double | Pow6 (double x) |
| 6th power. More...
|
|
static double | Sqrt (double a) |
| Returns the square root of a specified number. More...
|
|
static double | Root2 (double a) |
| Returns the square root of a specified number. More...
|
|
static double | Root3 (double a) |
| Returns the cubic root of a specified number. More...
|
|
static double | Rand () |
| Returns a uniformly distributed random number greater than or equal to 0.0, and less or equal than 1.0. More...
|
|
static double | Rand (double min, double max) |
| Returns a uniformly distributed random number greater than or equal to min, and less or equal than max. More...
|
|
static double | RandGauss (double mean, double standardDeviation) |
| Returns a Gaussian distributed random number with the specified mean and standard deviation. More...
|
|
static double | Exp (double a) |
| Returns e raised to the specified power. More...
|
|
static double | Log (double a) |
| Returns the natural (base e) logarithm of a specified number. More...
|
|
static double | Log10 (double a) |
| Returns the base 10 logarithm of a specified number. More...
|
|
static double | Log2 (double a) |
| Returns the base 2 logarithm of a specified number. More...
|
|
static double | Log (double a, double logBase) |
| Returns the logarithm of a specified number in a specified base. More...
|
|
static double | Degrees (double x) |
| Converts angle in radians to angle in degrees and returns it. More...
|
|
static double | Radians (double x) |
| Converts angle in degrees to angle in radians and returns it. More...
|
|
static double | Sin (double a) |
| Returns the sine of the specified angle. More...
|
|
static double | Cos (double a) |
| Returns the cosine of the specified angle. More...
|
|
static double | Tan (double a) |
| Returns the tangent of the specified angle. More...
|
|
static double | tan (double a) |
| Returns the tangent of the specified angle. More...
|
|
static double | Cot (double x) |
| Returns cotangent of the specified angle. More...
|
|
static double | Acos (double a) |
| Returns the angle whose cosine is the specified number. More...
|
|
static double | acos (double a) |
| Returns the angle whose cosine is the specified number. More...
|
|
static double | Asin (double a) |
| Returns the angle whose sine is the specified number. More...
|
|
static double | asin (double a) |
| Returns the angle whose sine is the specified number. More...
|
|
static double | Atan (double a) |
| Returns the angle whose tangent is the specified number. More...
|
|
static double | atan (double a) |
| Returns the angle whose tangent is the specified number. More...
|
|
static double | arctan (double a) |
| Returns the angle whose tangent is the specified number. More...
|
|
static double | Acot (double x) |
| Arc cotangent, inverse of 1/tan(x). More...
|
|
static double | acot (double x) |
| Arc cotangent, inverse of 1/tan(x). More...
|
|
static double | ArcCot (double x) |
| Arc cotangent, inverse of 1/tan(x). More...
|
|
static double | arccot (double x) |
| Arc cotangent, inverse of 1/tan(x). More...
|
|
static double | Atan2 (double a, double b) |
| Returns the angle whose tangent is the quotient of two specified numbers. More...
|
|
static double | atan2 (double a, double b) |
| Returns the angle whose tangent is the quotient of two specified numbers. More...
|
|
static double | arctan2 (double a, double b) |
| Returns the angle whose tangent is the quotient of two specified numbers. More...
|
|
static double | Cosh (double a) |
| Returns the hyperbolic cosine of the specified angle. More...
|
|
static double | cosh (double a) |
| Returns the hyperbolic cosine of the specified angle. More...
|
|
static double | Tanh (double a) |
| Returns the hyperbolic tangent of the specified angle. More...
|
|
static double | tanh (double a) |
| Returns the hyperbolic tangent of the specified angle. More...
|
|
static double | Coth (double x) |
| Hyperblic cotangent, 1/Math.Tanh. More...
|
|
static double | coth (double x) |
| Hyperblic cotangent, 1/Math.Tanh. More...
|
|
static double | Arsinh (double x) |
| Inverse hyperbolic sine. More...
|
|
static double | Arcosh (double x) |
| Inverse hyperbolic cosine. More...
|
|
static double | Artanh (double x) |
| Inverse hyperbolic tangent. More...
|
|
static double | Arcoth (double x) |
| Inverse hyperbolic cotangent. More...
|
|
static long | Factorial (int factor) |
| Returns factorial of the specified number. More...
|
|
static long | factorial (int factor) |
| Returns factorial of the specified number. More...
|
|
static long | BinomialCoefficient (long n, long k) |
| Returns binomial coefficient n over k . More...
|
|
static void | Swap (ref double a, ref double b) |
| Swaps values of the two specified variables of type double. More...
|
|
static void | Swap (ref int a, ref int b) |
| Swaps values of the two specified variables of type int. More...
|
|
static void | Swap (ref string a, ref string b) |
| Swaps values of the two specified variables of type string. More...
|
|
static double | abs (double a) |
| Absolute value. More...
|
|
static double | sign (double a) |
| Returns a value indicating the sign of a number. More...
|
|
static double | ceil (double a) |
| Returns the smallest integral value that is greater than or equal to the specified decimal number. More...
|
|
static double | floor (double a) |
| Returns the largest integer less than or equal to the specified number. More...
|
|
static double | trunc (double a) |
| Calculates the integral part of a specified number. More...
|
|
static double | min (double a, double b) |
| Smallest of two numbers. More...
|
|
static double | max (double a, double b) |
| Largest of two numbers. More...
|
|
static double | min (double a, double b, double c) |
| Smallest of three numbers. More...
|
|
static double | max (double a, double b, double c) |
| Largest of three numbers. More...
|
|
static double | min (double a, double b, double c, double d) |
| Smallest of four numbers. More...
|
|
static double | max (double a, double b, double c, double d) |
| Largest of four numbers. More...
|
|
static double | min (double a, double b, double c, double d, double e) |
| Smallest of five numbers. More...
|
|
static double | max (double a, double b, double c, double d, double e) |
| Largest of five numbers. More...
|
|
static double | min (double a, double b, double c, double d, double e, double f) |
| Smallest of six numbers. More...
|
|
static double | max (double a, double b, double c, double d, double e, double f) |
| Largest of six numbers. More...
|
|
static double | min (params double[] numbers) |
| Minimal of the specified values. More...
|
|
static double | max (params double[] numbers) |
| Maximal of the specified values. More...
|
|
static double | sum (params double[] numbers) |
| Sum of the specified values. More...
|
|
static double | prod (params double[] numbers) |
| Product of the specified values. More...
|
|
static double | pow (double a, double b) |
| Returns a specified number raised to the specified power. More...
|
|
static double | sqr (double a) |
| Returns the square of a specified number. More...
|
|
static double | cube (double a) |
| Returns the square of a specified number. More...
|
|
static double | pow2 (double x) |
| Square. More...
|
|
static double | pow3 (double x) |
| 3rd power. More...
|
|
static double | pow4 (double x) |
| 4th power. More...
|
|
static double | pow5 (double x) |
| 5th power. More...
|
|
static double | pow6 (double x) |
| 6th power. More...
|
|
static double | sqrt (double a) |
| Returns the square root of a specified number. More...
|
|
static double | root2 (double a) |
| Returns the square root of a specified number. More...
|
|
static double | root3 (double a) |
| Returns the cubic root of a specified number. More...
|
|
static double | rand () |
| Returns a uniformly distributed random number greater than or equal to 0.0, and less or equal than 1.0. More...
|
|
static double | rand (double min, double max) |
| Returns a uniformly distributed random number greater than or equal to min, and less or equal than max. More...
|
|
static double | randgauss (double mean, double standardDeviation) |
| Returns a Gaussian distributed random number with the specified mean and standard deviation. More...
|
|
static double | exp (double a) |
| Returns e raised to the specified power. More...
|
|
static double | log (double a) |
| Returns the natural (base e) logarithm of a specified number. More...
|
|
static double | ln (double a) |
| Returns the natural (base e) logarithm of a specified number. More...
|
|
static double | log10 (double a) |
| Returns the base 10 logarithm of a specified number. More...
|
|
static double | lg (double a) |
| Returns the base 10 logarithm of a specified number. More...
|
|
static double | log2 (double a) |
| Returns the base 2 logarithm of a specified number. More...
|
|
static double | log (double a, double logBase) |
| Returns the logarithm of a specified number in a specified base. More...
|
|
static double | deg (double x) |
| Converts angle in radians to angle in degrees and returns it. More...
|
|
static double | rad (double x) |
| Converts angle in degrees to angle in radians and returns it. More...
|
|
static double | sin (double a) |
| Returns the sine of the specified angle. More...
|
|
static double | cos (double a) |
| Returns the cosine of the specified angle. More...
|
|
static double | tg (double a) |
| Returns the tangent of the specified angle. More...
|
|
static double | ctg (double x) |
| Returns cotangent of the specified angle. More...
|
|
static double | arccos (double a) |
| Returns the angle whose cosine is the specified number. More...
|
|
static double | arcsin (double a) |
| Returns the angle whose sine is the specified number. More...
|
|
static double | arctg (double a) |
| Returns the angle whose tangent is the specified number. More...
|
|
static double | arcctg (double x) |
| Arc cotangent, inverse of 1/tan(x). More...
|
|
static double | arctg2 (double a, double b) |
| Returns the angle whose tangent is the quotient of two specified numbers. More...
|
|
static double | Sinh (double a) |
| Returns the hyperbolic sine of the specified angle. More...
|
|
static double | sinh (double a) |
| Returns the hyperbolic sine of the specified angle. More...
|
|
static double | sh (double a) |
| Returns the hyperbolic sine of the specified angle. More...
|
|
static double | ch (double a) |
| Returns the hyperbolic cosine of the specified angle. More...
|
|
static double | th (double a) |
| Returns the hyperbolic tangent of the specified angle. More...
|
|
static double | cth (double x) |
| Hyperblic cotangent, 1/Math.Tanh. More...
|
|
static double | arsh (double x) |
| Inverse hyperbolic sine. More...
|
|
static double | arch (double x) |
| Inverse hyperbolic cosine. More...
|
|
static double | arth (double x) |
| Inverse hyperbolic tangent. More...
|
|
static double | arcth (double x) |
| Inverse hyperbolic cotangent. More...
|
|
static bool | CheckFactorialsArray () |
| Tests ehether the factoirals in the hard-coded array (factorials64) of factorials are correct; Throws ArgumentException if any of them is incorrect. More...
|
|
static void | TestFactorials () |
| Writes to the console all factorials that can be calculatet. More...
|
|
static void | TestFactorials (int max) |
| Writes to the console the first n factorials. More...
|
|
static long | fac (int factor) |
| Returns factorial of the specified number. More...
|
|
static long | facCalculated (long n) |
| Returns factorial of the specified number - less efficient approac, but does not rely on hard coded array. More...
|
|
static long | fallingPower (long n, long p) |
| Calculates and returns the falling power of the specified number. More...
|
|
static long | binomial (long n, long k) |
| Returns binomial coefficient n over k . More...
|
|
static void | TestBinomialCoefficients () |
| Writes the first few binomial coefficients to the console. More...
|
|
static void | TestBinomialCoefficients (int nMax) |
| Writes binomial coefficients up to the specified number to the console. More...
|
|
static double | Mean (ICollection< double > sample) |
| Returns mean value of the specified sample. More...
|
|
static double | Mean (IVector sample) |
| Returns mean value of the specified sample. More...
|
|
static double | Average (ICollection< double > sample) |
| Returns mean value of the specified sample. More...
|
|
static double | Average (IVector sample) |
| Returns mean value of the specified sample. More...
|
|
static double | StandardDeviation (ICollection< double > sample) |
| Returns estimation of the standard deviation of a random value based on the specified sample. More...
|
|
static double | StandardDeviation (IVector sample) |
| Returns estimation of the standard deviation of a random value based on the specified sample. More...
|
|
Defines some mathematical functions to be used in derived classes. In addition to functions defined in the M class, functions are defined under other names, and some additional functions are also defined.
* Standard mathematical functions and constants with short names are implemented, e.g. sin() instesd of Math.Sin().
** These functions are static such that they can be used out of the derived classes, too.
*** In particular, some script classes derive from this one, in order to use simple-named mathematical functions.
** Some functions are defined with several names, in order to reduce probability of errors in scripts.