NMath Reference Guide

## Float |

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

Inheritance Hierarchy

Syntax

The FloatComplex type exposes the following members.

Constructors

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

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

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

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

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

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

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

Methods

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

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

Add(FloatComplex, Single) | Returns the sum of a complex number and a real number. | |

Add(Single, FloatComplex) | Returns the sum of a real and a complex number. | |

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

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

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

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

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

Divide(Single, FloatComplex) | Returns the quotient of dividing a real number by a complex 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(FloatComplex, FloatComplex) | Returns the product of two complex numbers. | |

Multiply(FloatComplex, Single) | Returns the product of a complex number and a real. | |

Multiply(Single, FloatComplex) | Returns the product of a real and a complex number. | |

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 FloatComplex instance from a string representation of the form real,imag or (real,imag). | |

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

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

Subtract(FloatComplex, Single) | Returns the difference of a complex number and a real number. | |

Subtract(Single, FloatComplex) | Returns the difference of a real number and a complex 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(FloatComplex, FloatComplex) | Returns the sum of two complex numbers. | |

Addition(FloatComplex, Single) | Returns the sum of a complex number and a real number. | |

Addition(Single, FloatComplex) | Returns the sum of a real and a complex number. | |

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

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

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

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

(Single to FloatComplex) | Implicitly converts a floating point number into a FloatComplex instance. The imaginary part is set to 0.0. | |

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

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

Multiply(FloatComplex, Single) | Returns the product of a complex number and a real. | |

Multiply(Single, FloatComplex) | Returns the product of a real and a complex number. | |

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

Subtraction(FloatComplex, Single) | Returns the difference of a complex number and a real number. | |

Subtraction(Single, FloatComplex) | Returns the difference of a real number and a complex number. | |

UnaryNegation(FloatComplex) | 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 FloatComplex instance has public floating point data members Real
and Imag.

FloatComplex supports equality operations, conversion from type float 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.

FloatComplex supports equality operations, conversion from type float 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