NMath Reference Guide

## Double |

The DoubleComplex struct represents a complex number, consisting of a
real part and an imaginary part.

Inheritance Hierarchy

Syntax

The DoubleComplex type exposes the following members.

Constructors

Name | Description | |
---|---|---|

DoubleComplex(Double) | Constructs a DoubleComplex instance with the specified real part. The imaginary part is set to 0.0. | |

DoubleComplex(FloatComplex) | Constructs a DoubleComplex instance from a FloatComplex instance. | |

DoubleComplex(Single) | Constructs a DoubleComplex instance with the specified real part. The imaginary part is set to 0.0. | |

DoubleComplex(String) | Constructs a DoubleComplex instance from a string representation of the form real,imag or (real,imag). | |

DoubleComplex(Double, Double) | Constructs a DoubleComplex instance with the specified real and imaginary parts. | |

DoubleComplex(Single, Single) | Constructs a DoubleComplex instance with the specified real and imaginary parts. | |

DoubleComplex(String, NumberStyles) | Constructs a new DoubleComplex instance from a given string representation using the specified style. |

Methods

Name | Description | |
---|---|---|

Add(Double, DoubleComplex) | Returns the sum of a real and a complex number. | |

Add(DoubleComplex, DoubleComplex) | Returns the sum of two complex numbers. | |

Add(DoubleComplex, Double) | Returns the sum of a complex number and a real number. | |

Arg | Returns the argument (or phase) of a complex number. | |

Conj | Returns the conjugate of this complex number. | |

Conj(DoubleComplex) | Obsolete.Returns the conjugate of a complex number. | |

Divide(Double, DoubleComplex) | Returns the quotient of dividing a real number by a complex number. | |

Divide(DoubleComplex, DoubleComplex) | Returns the quotient of dividing one complex number by another. | |

Divide(DoubleComplex, Double) | Returns the quotient of dividing a complex number by a real number. | |

Equals |
Tests for equality of this complex number and another complex number.
(Overrides ValueTypeEquals(Object)) | |

FromPolar | Returns a complex number in Cartesian form from the supplied polar coordinates. | |

GetHashCode |
Returns an integer hash code for this complex number.
(Overrides ValueTypeGetHashCode) | |

Multiply(Double, DoubleComplex) | Returns the product of a real and a complex number. | |

Multiply(DoubleComplex, DoubleComplex) | Returns the product of two complex numbers. | |

Multiply(DoubleComplex, Double) | Returns the product of a complex number and a real. | |

NaNEquals | Tests for equality of this complex number and another complex number. | |

Negate | Returns the negation of a complex number. | |

Norm | Returns the norm (or modulus) of a complex number. | |

Parse(String) | Constructs a DoubleComplex instance from a string representation of the form real,imag or (real,imag). | |

Parse(String, NumberStyles) | Constructs a new DoubleComplex instance from a given string representation using the specified style. | |

Subtract(Double, DoubleComplex) | Returns the difference of a real number and a complex number. | |

Subtract(DoubleComplex, DoubleComplex) | Returns the difference of two complex numbers. | |

Subtract(DoubleComplex, Double) | Returns the difference of a complex number and a real number. | |

ToString |
Returns a formatted string representation of this complex number
of the form (real,imag).
(Overrides ValueTypeToString) | |

ToString(String) | Returns a formatted string representation of this complex number of the form (real,imag) The real numbers real and imag are formatted according to the input format string formatString. |

Operators

Name | Description | |
---|---|---|

Addition(Double, DoubleComplex) | Returns the sum of a real and a complex number. | |

Addition(DoubleComplex, DoubleComplex) | Returns the sum of two complex numbers. | |

Addition(DoubleComplex, Double) | Returns the sum of a complex number and a real number. | |

Division(Double, DoubleComplex) | Returns the quotient of dividing a real number by a complex number. | |

Division(DoubleComplex, DoubleComplex) | Returns the quotient of dividing one complex number by another. | |

Division(DoubleComplex, Double) | Returns the quotient of dividing a complex number by a real number. | |

Equality(DoubleComplex, DoubleComplex) | Tests for equality of two complex numbers. | |

(Double to DoubleComplex) | Implicitly converts a double-precision floating point number into a DoubleComplex instance. The imaginary part is set to 0.0. | |

(FloatComplex to DoubleComplex) | Implicitly converts a FloatComplex instance into a DoubleComplex instance. | |

Inequality(DoubleComplex, DoubleComplex) | Tests for inequality of two complex numbers. | |

Multiply(Double, DoubleComplex) | Returns the product of a real and a complex number. | |

Multiply(DoubleComplex, DoubleComplex) | Returns the product of two complex numbers. | |

Multiply(DoubleComplex, Double) | Returns the product of a complex number and a real. | |

Subtraction(Double, DoubleComplex) | Returns the difference of a real number and a complex number. | |

Subtraction(DoubleComplex, DoubleComplex) | Returns the difference of two complex numbers. | |

Subtraction(DoubleComplex, Double) | Returns the difference of a complex number and a real number. | |

UnaryNegation(DoubleComplex) | Returns the negation of a complex number. |

Fields

Name | Description | |
---|---|---|

Imag | The imaginary part of this complex number. | |

Real | The real part of this complex number. |

Remarks

A DoubleComplex instance has public double-precision floating point data members
Real and Imag.

DoubleComplex supports equality operations, conversion from type double or a string representation, and basic arithmetic operations. Static member functions are also provided for returning the argument (or phase) of a complex number, the complex conjugate, the norm (or modulus), and for converting from polar coordinates.

Trigonometric functions for complex numbers, and mathematical functions such as exponents, logarithms, powers, and square roots, are available in class NMathFunctions.

DoubleComplex supports equality operations, conversion from type double or a string representation, and basic arithmetic operations. Static member functions are also provided for returning the argument (or phase) of a complex number, the complex conjugate, the norm (or modulus), and for converting from polar coordinates.

Trigonometric functions for complex numbers, and mathematical functions such as exponents, logarithms, powers, and square roots, are available in class NMathFunctions.

See Also