Represents a complex number.

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Structure DoubleComplex _
	Implements IEquatable(Of DoubleComplex), IEquatable(Of Double)
C#
public struct DoubleComplex : IEquatable<DoubleComplex>, IEquatable<double>
C++
public value class DoubleComplex : IEquatable<DoubleComplex>, IEquatable<double>

Methods

IconTypeDescription
static memberAbs(DoubleComplex)
Returns the absolute value of a DoubleComplex number.
static memberAcos(Double)
Gets the inverse cosine of a real number.
static memberAcos(DoubleComplex)
Gets the inverse cosine of a DoubleComplex number.
static memberAcosh(DoubleComplex)
Gets the inverse hyperbolic cosine of a DoubleComplex number.
static memberAdd(DoubleComplex, DoubleComplex)
Adds two DoubleComplex numbers.
static memberAdd(DoubleComplex, Double)
Adds a DoubleComplex number to a real number.
static memberAdd(Double, DoubleComplex)
Adds a DoubleComplex number to a real number.
static memberAddition(DoubleComplex, DoubleComplex)
Adds two DoubleComplex numbers.
static memberAddition(DoubleComplex, Double)
Adds a DoubleComplex number to a real number.
static memberAddition(Double, DoubleComplex)
Adds a DoubleComplex number to a real number.
static memberAsin(Double)
Gets the inverse sine of a real number.
static memberAsin(DoubleComplex)
Gets the inverse sine of a DoubleComplex number.
static memberAsinh(DoubleComplex)
Gets the inverse hyperbolic sine of a DoubleComplex number.
static memberAtan(DoubleComplex)
Gets the inverse tangent of a DoubleComplex number.
static memberAtanh(DoubleComplex)
Gets the inverse hyperbolic tangent of a DoubleComplex number.
static memberConjugate(DoubleComplex)
Returns the conjugate of a DoubleComplex number.
Conjugate()
Returns the conjugate of this instance.
static memberConjugateMultiply(DoubleComplex, DoubleComplex)
Multiplies the Conjugate(DoubleComplex) of a DoubleComplex number and a second DoubleComplex number.
static memberCos(DoubleComplex)
Gets the cosine of a DoubleComplex number.
static memberCosh(DoubleComplex)
Gets the hyperbolic cosine of a DoubleComplex number.
static memberDecrement(DoubleComplex)
Decrements the real part of a DoubleComplex number by one.
static memberDecrement(DoubleComplex)
Decrements the real part of a DoubleComplex number by one.
static memberDivide(DoubleComplex, DoubleComplex)
Divides a DoubleComplex number by another.
static memberDivide(Double, DoubleComplex)
Divides a real number by a DoubleComplex number.
static memberDivide(DoubleComplex, Double)
Divides a DoubleComplex number by a real number.
static memberDivision(DoubleComplex, DoubleComplex)
Divides a DoubleComplex number by another.
static memberDivision(Double, DoubleComplex)
Divides a real number by a DoubleComplex number.
static memberDivision(DoubleComplex, Double)
Divides a DoubleComplex number by a real number.
static memberEquality(DoubleComplex, DoubleComplex)
Compares two DoubleComplex numbers for equality.
static memberEquality(Double, DoubleComplex)
Compares a DoubleComplex number and a real number for equality.
static memberEquality(DoubleComplex, Double)
Compares a DoubleComplex number and a real number for equality.
Equals(Object)
Overridden. Returns a value indicating whether this instance is equal to a specified object.
Equals(DoubleComplex)
Compares a complex number to another complex number.
Equals(Double)
Compares a complex number to a real number.
static memberExp(DoubleComplex)
Returns e raised to the specified power.
static memberExpI(Double)
Evaluates the exponential function for an imaginary argument.
static memberExplicit(DoubleComplex)
Casts a DoubleComplex number to a real number. The imaginary part must be zero.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
static memberFromPolar(Double, Double)
Constructs a complex number from polar components.
GetHashCode()
Overridden. Returns the hash code for this instance.
static memberGetImaginaryPart(DoubleComplex[]())
Returns an array of Doubles that contains the imaginary parts of an array of DoubleComplex numbers.
static memberGetRealPart(DoubleComplex[]())
Returns an array of Doubles that contains the real parts of an array of DoubleComplex numbers.
GetType()
Gets the Type of the current instance.
static memberImaginary(Double)
Constructs a complex number that has a purely imaginary value.
static memberImplicit(Double)
Casts a real number to a DoubleComplex type.
static memberIncrement(DoubleComplex)
Increments the real part of a DoubleComplex number by one.
static memberIncrement(DoubleComplex)
Increments the real part of a DoubleComplex number by one.
static memberInequality(DoubleComplex, DoubleComplex)
Compares two DoubleComplex numbers for inequality.
static memberInequality(DoubleComplex, Double)
Compares a DoubleComplex number and a real number for inequality.
static memberInequality(Double, DoubleComplex)
Compares a DoubleComplex number and a real number for inequality.
static memberIsInfinity(DoubleComplex)
Indicates whether a DoubleComplex number is infinite.
static memberIsNaN(DoubleComplex)
Indicates whether a DoubleComplex number is undefined.
static memberLog(DoubleComplex)
Returns the natural logarithm of a DoubleComplex number.
static memberLog(DoubleComplex, DoubleComplex)
Returns the logarithm of a DoubleComplex number to the specified base.
static memberLog10(DoubleComplex)
Returns the base 10 logarithm of a DoubleComplex number.
MemberwiseClone()
Creates a shallow copy of the current Object.
static memberMultiply(DoubleComplex, DoubleComplex)
Multiplies two DoubleComplex numbers.
static memberMultiply(Double, DoubleComplex)
Multiplies a DoubleComplex number and a real number.
static memberMultiply(DoubleComplex, Double)
Multiplies a DoubleComplex number and a real number.
static memberMultiply(DoubleComplex, DoubleComplex)
Multiplies two DoubleComplex numbers.
static memberMultiply(Double, DoubleComplex)
Multiplies a DoubleComplex number and a real number.
static memberMultiply(DoubleComplex, Double)
Multiplies a DoubleComplex number and a real number.
static memberNegate(DoubleComplex)
Negates a DoubleComplex number.
static memberPlus(DoubleComplex)
Applies the unary plus operator to a DoubleComplex number.
static memberPow(DoubleComplex, DoubleComplex)
Returns a DoubleComplex number raised to the specified power.
static memberPow(DoubleComplex, Double)
Returns a DoubleComplex number raised to the specified power.
static memberPow(DoubleComplex, Int32)
Returns a DoubleComplex number raised to the specified integer power.
static memberRootOfUnity(Int32, Int32)
Returns a complex number that is the ith root of unity of the specified degree.
static memberSin(DoubleComplex)
Gets the sine of a DoubleComplex number.
static memberSinh(DoubleComplex)
Gets the hyperbolic sine of a DoubleComplex number.
static memberSqrt(DoubleComplex)
Returns the first square root of a DoubleComplex number.
static memberSqrt(Double)
Returns the first square root of a real number.
static memberSubtract(DoubleComplex, DoubleComplex)
Subtracts two DoubleComplex numbers.
static memberSubtract(DoubleComplex, Double)
Subtracts a real number from a DoubleComplex number.
static memberSubtract(Double, DoubleComplex)
Subtracts a DoubleComplex number from a real number.
static memberSubtraction(DoubleComplex, DoubleComplex)
Subtracts two DoubleComplex numbers.
static memberSubtraction(DoubleComplex, Double)
Subtracts a real number from a DoubleComplex number.
static memberSubtraction(Double, DoubleComplex)
Subtracts a DoubleComplex number from a real number.
static memberTan(DoubleComplex)
Gets the tangent of a DoubleComplex number.
static memberTanh(DoubleComplex)
Gets the hyperbolic tangent of a DoubleComplex number.
ToString()
Converts the numeric value of this instance to its equivalent string representation.
ToString(IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
ToString(String, IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
ToString(String)
Converts the numeric value of this instance to its equivalent string representation using the specified format.
static memberUnaryNegation(DoubleComplex)
Negates a DoubleComplex number.
static memberUnaryPlus(DoubleComplex)
Applies the unary plus operator to a DoubleComplex number.

Fields

IconTypeDescription
static memberI
Represents the square root of -1.
static memberInfinity
Represents complex infinity.
static memberNaN
Represents complex NaN, or Not a Number.
static memberOne
Represents the complex number one.
static memberZero
Represents the complex number zero.

Constructors

IconTypeDescription
DoubleComplexNew(Double, Double)
Constructs a complex number from its real and imaginary parts.
DoubleComplexNew(Double)
Constructs a complex number from a real number.
DoubleComplexNew(Double, Double, Boolean)
Constructs a complex number from rectangular or polar components.

Properties

IconTypeDescription
Argument
Gets the argument of a DoubleComplex number.
Im
Gets the imaginary part of the complex number.
IsImaginary
Indicates whether a DoubleComplex number is a pure imaginary number.
IsReal
Indicates whether a DoubleComplex number is, in fact, real.
IsZero
Indicates whether a DoubleComplex number is equal to zero.
Modulus
Gets the modulus or absolute value of a DoubleComplex number.
ModulusSquared
Returns the square of the modulus of a DoubleComplex number.
Re
Gets the real part of the DoubleComplex number.

Remarks

The DoubleComplex value type represents a complex number made of double-precision, 64-bit real and imaginary parts.

DoubleComplex numbers arise in algebra in the solution of quadratic equations. The equation x2= –1 does not have any real solutions. However, if we define a new number, i as the square root of -1, then we have two solutions: i and -i.

This, in turn, gives rise to an entirely new class of numbers of the form a + ib with a and b real, and i defined as above. These are the complex numbers.

The DoubleComplex structure provides methods for all the common operations on complex numbers. The Re property returns the real component of the complex number, while Im returns the imaginary part. Because the complex numbers don't have a natural ordering, only equality and inequality operators are available.

Overloaded versions of the major arithmetic operators are provided for languages that support them. For languages that don't support operator overloading, equivalent staticSharedstatic methods are supplied.

When performing binary operations, if one of the operands is a DoubleComplex, then the other operand is required to be an integral type or a floating-point type (Double or Single) or a complex type (DoubleComplex). Prior to performing the operation, if the other operand is not a DoubleComplex, it is converted to DoubleComplex, and the operation is performed using at least double precision. If the operation produces a numeric result, the type of the result is DoubleComplex.

Exceptions to this are methods that return a real property of a complex number: Argument, Modulus, ModulusSquared and Abs(DoubleComplex). These methods return a Double value.

The floating-point operators, including the assignment operators, do not throw exceptions. Instead, in exceptional situations, the result of a floating-point operation is zero, Infinity, or NaN, as described below:

  • If the result of a complex floating-point operation is too small for the destination format, the result of the operation is zero.
  • If the magnitude of the complex result of a floating-point operation is too large for the destination format, the result of the operation is Infinity. Directed infinities are currently not supported.
  • If a complex floating-point operation is invalid, the result of the operation is NaN.
  • If one or both operands of a complex floating-point operation are NaN, the result of the operation is NaN.

Many elementary functions have been extended to the complex domain. These are implemented by static methods.

Some of these functions are multi-valued. If there is one real argument, then any symmetry or anti-symmetry about the origin is preserved. For example, the inverse sine function satisfies asin(-x) == -asin(x) for -1 <= x <= 1. The Asin(Double) method satisfies this relationship for any real value of x.

For complex arguments, the identity Conjugate(f(x)) == f(Conjugate(x)) is preserved. The branch cuts for all complex functions defined here are along either the real or the imaginary axis. Along the branch cuts, the functions have different values depending on whether the zero component is normal (positive) zero or negative zero.

The real and imaginary parts of DoubleComplex numbers are double-precision floating-point numbers.