Operations<T> Class

Represents the arithmetic and other operations for an operand type.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static class Operations<T>
Inheritance
Object  →  Operations<T>

Type Parameters

T
The operand type.

Remarks

Use the Operations<T> class to perform operations on operand types that are generic type parameters.

Most operations are implemented as fields that contain delegates that perform the operation. This gives the best performance. When an operation can have several overloads, methods that wrap private fields are used instead.

For primitive types, the operation is performed directly if it is defined. For other types, operator methods are used if they are available. Otherwise, if an arithmetic type has been declared for the operand type in the type association registry, the operations defined by that arithmetic type are used.

Properties

Acos Gets a delegate that returns the angle whose cosine is the specified number.
Acosh Gets a delegate that returns the inverse hyperbolic cosine of a real number.
Asin Gets a delegate that returns the angle whose cosine is the specified number.
Asinh Gets a delegate that returns the inverse hyperbolic sine of a real number.
Atan Gets a delegate that returns the angle whose tangent is the specified number.
Atan2 Gets a delegate that returns the angle between the X-axis and a point with the specified coordinates.
Atanh Gets a delegate that returns the inverse hyperbolic tangent of a real number.
Ceiling Gets a delegate that returns the smallest integer greather than or equal to a number.
Compare Gets a delegate that compares two values.
Conjugate Gets a delegate that returns the conjugate of a complex number.
ConjugateMultiply Gets a delegate that multiplies the conjugate of a number by another number.
Cos Gets a delegate that returns the cosine of its argument.
Cosh Gets a delegate that returns the hyperbolic cosine of its argument.
E Gets the value of e, the base of the natural logarithm.
Epsilon Gets the machine precision of the operand type.
Exp Gets a delegate that returns the exponential of its argument.
Floor Gets a delegate that returns the largest integer less than or equal to a number.
FromDouble Gets a delegate that converts a double-precision floating-point number to the current number type.
Hypot Gets a delegate that returns the length of the hypotenuse of a right-angled triangle with sides of specified length.
IsFinite Gets a delegate that returns whether the operand is a finite number.
IsNaN Gets a delegate that returns whether the operand is Not-a-Number.
IsNegativeInfinity Gets a delegate that returns whether the operand is a negative infinity.
IsPositiveInfinity Gets a delegate that returns whether the operand equals positive infinity.
IsReal Gets whether the number type represents real numbers.
Log Gets a delegate that returns the natural logarithm of a number.
Log1PlusX Gets a delegate that returns the logarithm of 1 plus the argument.
MaxValue Gets the largest finite value of the numeric type.
MinPositiveValue Gets the smallest value that is greater than zero.
MinusOne Returns the value of -1 as an instance of the number type.
MinValue Gets the smallest finite value of the numeric type.
Modulus Gets a delegate that returns the remainder after dividing two numbers.
NaN Gets the Not-a-Number value for the operand type.
NegativeInfinity Gets the value of negative infinity for the operand type.
One Returns the value of 1 as an instance of the number type.
OneNorm Gets a delegate that returns returns the sum of the absolute values of the real and imaginary parts of a complex number.
Pi Gets the value of π.
PiOverTwo Gets the value of π/2.
PositiveInfinity Gets the value of positive infinity for the operand type.
PowN Gets a delegate that raises a value to the specified power.
Obsolete.
Remainder Gets a delegate that returns the remainder after dividing two numbers.
Round Gets a delegate that rounds a number to the specified number of decimal digits.
ScaleByPowerOfTwo Multiplies a value by a power of two.
Sin Gets a delegate that returns the sine of its argument.
Sinh Gets a delegate that returns the hyperbolic sine of its argument.
Sqrt Gets a delegate that returns the square root of a number.
SupportsIeee Gets whether special IEEE values (NaN's and infinities) are supported by the type.
Tan Gets a delegate that returns the tangent of the specified angle.
Tanh Gets a delegate that returns the hyperbolic tangent of the specified angle.
ToInt32 Converts an instance of the operand type to an integer.
Zero Returns the value of zero as an instance of the number type.

Methods

Abs Returns the absolute value of a number.
Add Returns the sum of two numbers.
And Returns the logical or bitwise and of two numbers.
ConvertTo<U> Converts an instance of the operand type to the specified type.
Copy Returns a copy of a number.
Divide Divides two numbers.
EqualTo Returns whether two numbers are equal.
FromInt32 Converts an integer to an instance of the operand type.
GreaterThan 
GreaterThanOrEqual 
IsOne Returns whether a number equals one.
IsZero Returns whether a number equals zero.
LeftShift Shifts a value the specified number of bits to the left.
LessThan Returns if one number is less than another.
LessThanOrEqual Returns if one number is less than another.
Log10 Gets a delegate that returns the natural logarithm of a number.
Multiply Returns the product of two numbers.
Negate Reverses the sign of a number.
Not Returns the logical or bitwise complement of two numbers.
NotEqualTo Returns whether two numbers are equal.
Or Returns the logical or bitwise or of two numbers.
Pow(T, T) Gets a delegate that raises a number to the specified power.
Pow(T, Int32) Gets a delegate that raises a number to the specified power.
Reciprocal Returns the reciprocal of a number.
RightShift Shifts a value the specified number of bits to the right.
Sign Gets a delegate that returns the sign of the specified number.
Subtract Subtracts one number from another.
Xor Returns the logical or bitwise exclusive or of two numbers.

See Also