Fundamentals
Learn about the fundamentals of Mathematics.NET below.
Numeric Types
All numeric types in Mathematics.NET implement the IComplex interface. Unlike INumberBase, this interface defines the method Conjugate, which makes operations that accept either complex or real numbers as parameters more robust.
Complex Numbers
Because the complex number type in this library shares the name with .NET's own implementation, use the following statement to avoid conflicts:
using Complex = Mathematics.NET.Core.Complex;
Basic methods and properties made available include Conjugate, Magnitude, and Phase.
Real Numbers
Real numbers are represented by the Real type. It implements the IReal interface, which inherits from IComplex, and contains additional methods such as Max and Min.
Rational Numbers
Rational numbers are represented by the Rational type. This type implements the IRational interface, which inherits from IReal, and contains addition methods such as Reciprocate and GCD. Rationals accept any backing type that implements the IBinaryInteger and ISignedNumber interfaces. This includes BigInteger, which should be used carefully due to its performance implications.
Methods and properties made available include Num, Den, Reduce, and Reciprocate.