Math.NET Numerics v0.3

Complex Structure

Complex numbers class.

For a list of all members of this type, see Complex Members.

System.Object
   ValueType
      Complex

public struct Complex

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The class Complex provides all elementary operations on complex numbers. All the operators +, -, *, /, ==, != are defined in the canonical way. Additional complex trigonometric functions such as Cos, Acoth, ... are also provided. Note that the Complex structures has two special constant values NaN and Infinity.

In order to avoid possible ambiguities resulting from a Complex(double, double) constructor, the static methods FromRealImaginary and FromModulusArgument are provided instead.

Complex x = Complex.FromRealImaginary(1d, 2d);
Complex y = Complex.FromModulusArgument(1d, Math.Pi);
Complex z = (x + y) / (x - y);

Since there is no canonical order amoung the complex numbers, Complex does not implement IComparable but several lexicographic IComparer implementations are provided, see RealImaginaryComparer, ModulusArgumentComparer and ArgumentModulusComparer.

For mathematical details about complex numbers, please have a look at the Wikipedia

Requirements

Namespace: MathNet.Numerics

Assembly: MathNet.Numerics (in MathNet.Numerics.dll)

See Also

Complex Members | MathNet.Numerics Namespace