Edit

Share via


System.Numerics Namespace

Contains numeric types that complement the numeric primitives, such as Byte, Double, and Int32, that are defined by .NET.

Classes

BitOperations

Provides utility methods for intrinsic bit-twiddling operations. The methods use hardware intrinsics when available on the underlying platform; otherwise, they use optimized software fallbacks.

Vector

Provides a collection of static methods for creating, manipulating, and otherwise operating on generic vectors.

VectorExtensions

Structs

BigInteger

Represents an arbitrarily large signed integer.

Complex

Represents a complex number.

Matrix3x2

Represents a 3x2 matrix.

Matrix4x4

Represents a 4x4 matrix.

Plane

Represents a plane in three-dimensional space.

Quaternion

Represents a vector that is used to encode three-dimensional physical rotations.

TotalOrderIeee754Comparer<T>

Represents a comparison operation that compares floating-point numbers with IEEE 754 totalOrder semantic.

Vector<T>

Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.

Vector2

Represents a vector with two single-precision floating-point values.

Vector3

Represents a vector with three single-precision floating-point values.

Vector4

Represents a vector with four single-precision floating-point values.

Interfaces

IAdditionOperators<TSelf,TOther,TResult>

Defines a mechanism for computing the sum of two values.

IAdditiveIdentity<TSelf,TResult>

Defines a mechanism for getting the additive identity of a given type.

IBinaryFloatingPointIeee754<TSelf>

Defines an IEEE 754 floating-point type that is represented in a base-2 format.

IBinaryInteger<TSelf>

Defines an integer type that is represented in a base-2 format.

IBinaryNumber<TSelf>

Defines a number that is represented in a base-2 format.

IBitwiseOperators<TSelf,TOther,TResult>

Defines a mechanism for performing bitwise operations over two values.

IComparisonOperators<TSelf,TOther,TResult>

Defines a mechanism for comparing two values to determine relative order.

IDecrementOperators<TSelf>

Defines a mechanism for decrementing a given value.

IDivisionOperators<TSelf,TOther,TResult>

Defines a mechanism for computing the quotient of two values.

IEqualityOperators<TSelf,TOther,TResult>

Defines a mechanism for comparing two values to determine equality.

IExponentialFunctions<TSelf>

Defines support for exponential functions.

IFloatingPoint<TSelf>

Defines a floating-point type.

IFloatingPointConstants<TSelf>

Defines support for floating-point constants.

IFloatingPointIeee754<TSelf>

Defines an IEEE 754 floating-point type.

IHyperbolicFunctions<TSelf>

Defines support for hyperbolic functions.

IIncrementOperators<TSelf>

Defines a mechanism for incrementing a given value.

ILogarithmicFunctions<TSelf>

Defines support for logarithmic functions.

IMinMaxValue<TSelf>

Defines a mechanism for getting the minimum and maximum value of a type.

IModulusOperators<TSelf,TOther,TResult>

Defines a mechanism for computing the modulus or remainder of two values.

IMultiplicativeIdentity<TSelf,TResult>

Defines a mechanism for getting the multiplicative identity of a given type.

IMultiplyOperators<TSelf,TOther,TResult>

Defines a mechanism for computing the product of two values.

INumber<TSelf>

Defines a number type.

INumberBase<TSelf>

Defines the base of other number types.

IPowerFunctions<TSelf>

Defines support for power functions.

IRootFunctions<TSelf>

Defines support for root functions.

IShiftOperators<TSelf,TOther,TResult>

Defines a mechanism for shifting a value by another value.

ISignedNumber<TSelf>

Defines a number type which can represent both positive and negative values.

ISubtractionOperators<TSelf,TOther,TResult>

Defines a mechanism for computing the difference of two values.

ITrigonometricFunctions<TSelf>

Defines support for trigonometric functions.

IUnaryNegationOperators<TSelf,TResult>

Defines a mechanism for computing the unary negation of a value.

IUnaryPlusOperators<TSelf,TResult>

Defines a mechanism for computing the unary plus of a value.

IUnsignedNumber<TSelf>

Defines a number type that can only represent positive values.

Remarks

This namespace includes the following types:

  • The BigInteger structure, which is a nonprimitive integral type that supports arbitrarily large integers. An integral primitive such as Byte or Int32 includes a MinValue and a MaxValue property, which define the lower bound and upper bound supported by that data type. In contrast, the BigInteger structure has no lower or upper bound, and can contain the value of any integer.

  • The Complex structure, which represents a complex number. A complex number is a number in the form a + bi, where a is the real part, and b is the imaginary part.

  • The SIMD-enabled vector types, which include Vector2, Vector3, Vector4, Matrix3x2, Matrix4x4, Plane, and Quaternion.