Complex Type

A double-precision complex number representation.

Constructors

Constructor Description

Complex(real, imaginary)

Full Usage: Complex(real, imaginary)

Parameters:
    real : float -
    imaginary : float -

Create a complex number from a real and an imaginary component

real : float

imaginary : float

Complex(c)

Full Usage: Complex(c)

Parameters:

Create a complex number based on an existing complex number

c : Complex

Complex(s)

Full Usage: Complex(s)

Parameters:
    s : string - The string to create the Complex from.

Created a Complex from the given string. The string can be in the following formats: n, ni, n +/- ni, n,n, n,ni, (n,n), or (n,ni), where n is a real number.

s : string

The string to create the Complex from.

FormatException if the n, is not a number.
ArgumentNullException if s, is null.

Instance members

Instance member Description

this.Clone

Full Usage: this.Clone

Returns: Complex

Clone the complex number

Returns: Complex

this.CompareTo

Full Usage: this.CompareTo

Parameters:
    o : obj -

Returns: int
Modifiers: abstract

Compare to other complex numbers or real numbers

o : obj

Returns: int

this.Equals

Full Usage: this.Equals

Parameters:
    obj : Complex - obj to compare present ComplexDouble to.

Returns: bool Returns true if the variable is the same as the ComplexDouble variable

Check if ComplexDouble variable is the same as another object

The obj parameter is converted into a ComplexDouble variable before comparing with the current ComplexDouble.

obj : Complex

obj to compare present ComplexDouble to.

Returns: bool

Returns true if the variable is the same as the ComplexDouble variable

this.Equals

Full Usage: this.Equals

Parameters:
    obj : ComplexFloat - obj to compare present ComplexDouble to.

Returns: bool Returns true if the variable is the same as the ComplexDouble variable

Check if ComplexDouble variable is the same as another object

The obj parameter is converted into a ComplexDouble variable before comparing with the current ComplexDouble.

obj : ComplexFloat

obj to compare present ComplexDouble to.

Returns: bool

Returns true if the variable is the same as the ComplexDouble variable

this.Equals

Full Usage: this.Equals

Parameters:
    obj : obj - obj to compare present ComplexDouble to.

Returns: bool Returns true if the variable is the same as the ComplexDouble variable
Modifiers: abstract

Check if ComplexDouble variable is the same as another object

The obj parameter is converted into a ComplexDouble variable before comparing with the current ComplexDouble.

obj : obj

obj to compare present ComplexDouble to.

Returns: bool

Returns true if the variable is the same as the ComplexDouble variable

this.GetArgument

Full Usage: this.GetArgument

Returns: float

The argument (radians) of the complex number

Returns: float

this.GetConjugate

Full Usage: this.GetConjugate

Returns: Complex

Get the conjugate of the complex number

Returns: Complex

this.GetHashCode

Full Usage: this.GetHashCode

Returns: int
Modifiers: abstract

Get the hash code of the complex number

Returns: int

this.GetModulus

Full Usage: this.GetModulus

Returns: float

The modulus (length) of the complex number

Returns: float

this.GetModulusSquared

Full Usage: this.GetModulusSquared

Returns: float

The squared modulus (length^2) of the complex number

Returns: float

this.Imag

Full Usage: this.Imag

The imaginary component of the complex number

this.IsInfinity

Full Usage: this.IsInfinity

Returns: bool True if either the real or imaginary components are infinite, false otherwise.

Tests whether the the complex number is infinite.

Returns: bool

True if either the real or imaginary components are infinite, false otherwise.

this.IsNaN

Full Usage: this.IsNaN

Returns: bool True if either the real or imaginary components are NaN, false otherwise.

Tests whether the the complex number is not a number.

Returns: bool

True if either the real or imaginary components are NaN, false otherwise.

this.Normalize

Full Usage: this.Normalize

Scale the complex number to 1.

this.Real

Full Usage: this.Real

The real component of the complex number

this.ToString

Full Usage: this.ToString

Returns: string The string representation of the value of this instance.
Modifiers: abstract

A string representation of this Complex.

Returns: string

The string representation of the value of this instance.

this.ToString

Full Usage: this.ToString

Parameters:
    format : string - A format specification.

Returns: string The string representation of the value of this instance as specified by format.

A string representation of this Complex.

format : string

A format specification.

Returns: string

The string representation of the value of this instance as specified by format.

this.ToString

Full Usage: this.ToString

Parameters:
    formatProvider : IFormatProvider - An IFormatProvider that supplies culture-specific formatting information.

Returns: string The string representation of the value of this instance as specified by provider.

A string representation of this Complex.

formatProvider : IFormatProvider

An IFormatProvider that supplies culture-specific formatting information.

Returns: string

The string representation of the value of this instance as specified by provider.

this.ToString

Full Usage: this.ToString

Parameters:
    format : string - A format specification.
    formatProvider : IFormatProvider - An IFormatProvider that supplies culture-specific formatting information.

Returns: string The string representation of the value of this instance as specified by format and provider.

A string representation of this Complex.

format : string

A format specification.

formatProvider : IFormatProvider

An IFormatProvider that supplies culture-specific formatting information.

Returns: string

The string representation of the value of this instance as specified by format and provider.

FormatException if the n, is not a number.
ArgumentNullException if s, is null.

Static members

Static member Description

a * f

Full Usage: a * f

Parameters:
Returns: Complex

Multiply a complex number by a real

a : Complex

f : float

Returns: Complex

f * a

Full Usage: f * a

Parameters:
Returns: Complex

Multiply a real by a complex number

f : float

a : Complex

Returns: Complex

a * b

Full Usage: a * b

Parameters:
Returns: Complex

Multiply two complex numbers together

a : Complex

b : Complex

Returns: Complex

a + f

Full Usage: a + f

Parameters:
Returns: Complex

Add a complex number to a real

a : Complex

f : float

Returns: Complex

f + a

Full Usage: f + a

Parameters:
Returns: Complex

Add a real to a complex number

f : float

a : Complex

Returns: Complex

a + b

Full Usage: a + b

Parameters:
Returns: Complex

Add to complex numbers

a : Complex

b : Complex

Returns: Complex

a - f

Full Usage: a - f

Parameters:
Returns: Complex

Subtract a real from a complex number

a : Complex

f : float

Returns: Complex

f - a

Full Usage: f - a

Parameters:
Returns: Complex

Subtract a complex number from a real

f : float

a : Complex

Returns: Complex

a - b

Full Usage: a - b

Parameters:
Returns: Complex

Subtract two complex numbers

a : Complex

b : Complex

Returns: Complex

a / f

Full Usage: a / f

Parameters:
Returns: Complex

Divide a complex number by a real number

a : Complex

f : float

Returns: Complex

a / b

Full Usage: a / b

Parameters:
Returns: Complex

Divide a complex number by a complex number

a : Complex

b : Complex

Returns: Complex

a / z

Full Usage: a / z

Parameters:
Returns: Complex

a : float
z : Complex
Returns: Complex

a <> b

Full Usage: a <> b

Parameters:
Returns: bool

Are these two complex numbers different?

a : Complex

b : Complex

Returns: bool

a = b

Full Usage: a = b

Parameters:
Returns: bool

Are these two complex numbers equivalent?

a : Complex

b : Complex

Returns: bool

~+a

Full Usage: ~+a

Parameters:
Returns: Complex

This operator doesn't do much. :-)

a : Complex

Returns: Complex

~-a

Full Usage: ~-a

Parameters:
Returns: Complex

Negate the complex number

a : Complex

Returns: Complex

Complex.FromModulusArgument(modulus, argument)

Full Usage: Complex.FromModulusArgument(modulus, argument)

Parameters:
    modulus : float -
    argument : float -

Returns: Complex

Create a complex number from a modulus (length) and an argument (radian)

modulus : float

argument : float

Returns: Complex

Complex.FromRealImaginary(real, imaginary)

Full Usage: Complex.FromRealImaginary(real, imaginary)

Parameters:
    real : float -
    imaginary : float -

Returns: Complex

Create a complex number from a real and an imaginary component

real : float

imaginary : float

Returns: Complex

Complex.I

Full Usage: Complex.I

Returns: Complex

Represents the result of sqrt( -1 )

Returns: Complex

Complex.IsEqual(a, b, tolerance)

Full Usage: Complex.IsEqual(a, b, tolerance)

Parameters:
Returns: bool

Determine whether two complex numbers are almost (i.e. within the tolerance) equivalent.

a : Complex

b : Complex

tolerance : float

Returns: bool

Complex.MaxValue

Full Usage: Complex.MaxValue

Returns: Complex

Represents the largest possible value of Complex.

Returns: Complex

Complex.MinValue

Full Usage: Complex.MinValue

Returns: Complex

Represents the smallest possible value of Complex.

Returns: Complex

Complex.NaN

Full Usage: Complex.NaN

Returns: Complex

Returns: Complex

Complex.One

Full Usage: Complex.One

Returns: Complex

Represents One

Returns: Complex

Complex.Parse(s)

Full Usage: Complex.Parse(s)

Parameters:
    s : string - the string to parse.

Returns: Complex

Creates a Complex based on a string. The string can be in the following formats: n, ni, n +/- ni, n,n, n,ni, (n,n), or (n,ni), where n is a real number.

s : string

the string to parse.

Returns: Complex

Complex.Zero

Full Usage: Complex.Zero

Returns: Complex

Represents zero

Returns: Complex

op_Explicitc

Full Usage: op_Explicitc

Parameters:
Returns: float

c : Complex
Returns: float

op_ImplicitcF

Full Usage: op_ImplicitcF

Parameters:
Returns: Complex

cF : ComplexFloat
Returns: Complex

op_Implicitd

Full Usage: op_Implicitd

Parameters:
    d : float

Returns: Complex

d : float
Returns: Complex