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
| Icon | Type | Description |
|---|---|---|
| Abs(DoubleComplex) |
Returns the absolute value of a DoubleComplex
number.
| |
| Acos(Double) |
Gets the inverse cosine of a real number.
| |
| Acos(DoubleComplex) |
Gets the inverse cosine of a DoubleComplex number.
| |
| Acosh(DoubleComplex) |
Gets the inverse hyperbolic cosine of a DoubleComplex number.
| |
| Add(DoubleComplex, DoubleComplex) |
Adds two DoubleComplex numbers.
| |
| Add(DoubleComplex, Double) |
Adds a DoubleComplex number to a real number.
| |
| Add(Double, DoubleComplex) |
Adds a DoubleComplex number to a real number.
| |
| Addition(DoubleComplex, DoubleComplex) |
Adds two DoubleComplex numbers.
| |
| Addition(DoubleComplex, Double) |
Adds a DoubleComplex number to a real number.
| |
| Addition(Double, DoubleComplex) |
Adds a DoubleComplex number to a real number.
| |
| Asin(Double) |
Gets the inverse sine of a real number.
| |
| Asin(DoubleComplex) |
Gets the inverse sine of a DoubleComplex number.
| |
| Asinh(DoubleComplex) |
Gets the inverse hyperbolic sine of a DoubleComplex number.
| |
| Atan(DoubleComplex) |
Gets the inverse tangent of a DoubleComplex number.
| |
| Atanh(DoubleComplex) |
Gets the inverse hyperbolic tangent of a DoubleComplex number.
| |
| Conjugate(DoubleComplex) |
Returns the conjugate of a DoubleComplex number.
| |
| Conjugate() |
Returns the conjugate of this instance.
| |
| ConjugateMultiply(DoubleComplex, DoubleComplex) |
Multiplies the Conjugate(DoubleComplex) of a DoubleComplex number
and a second DoubleComplex number.
| |
| Cos(DoubleComplex) |
Gets the cosine of a DoubleComplex number.
| |
| Cosh(DoubleComplex) |
Gets the hyperbolic cosine of a DoubleComplex number.
| |
| Decrement(DoubleComplex) |
Decrements the real part of a DoubleComplex number
by one.
| |
| Decrement(DoubleComplex) |
Decrements the real part of a DoubleComplex number
by one.
| |
| Divide(DoubleComplex, DoubleComplex) |
Divides a DoubleComplex number by another.
| |
| Divide(Double, DoubleComplex) |
Divides a real number by a DoubleComplex number.
| |
| Divide(DoubleComplex, Double) |
Divides a DoubleComplex number by a real number.
| |
| Division(DoubleComplex, DoubleComplex) |
Divides a DoubleComplex number by another.
| |
| Division(Double, DoubleComplex) |
Divides a real number by a DoubleComplex number.
| |
| Division(DoubleComplex, Double) |
Divides a DoubleComplex number by a real number.
| |
| Equality(DoubleComplex, DoubleComplex) |
Compares two DoubleComplex numbers for equality.
| |
| Equality(Double, DoubleComplex) |
Compares a DoubleComplex number and a real number for equality.
| |
| Equality(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.
| |
| Exp(DoubleComplex) |
Returns e raised to the specified power.
| |
| ExpI(Double) |
Evaluates the exponential function for an imaginary
argument.
| |
| Explicit(DoubleComplex) |
Casts a DoubleComplex number to a real number. The
imaginary part must be zero.
| |
| Finalize() | ||
| FromPolar(Double, Double) |
Constructs a complex number from polar components.
| |
| GetHashCode() |
Overridden. Returns the hash code for this instance.
| |
| GetImaginaryPart(DoubleComplex[]()) |
Returns an array of Doubles that contains the imaginary
parts of an array of DoubleComplex numbers.
| |
| GetRealPart(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. | |
| Imaginary(Double) |
Constructs a complex number that has a purely imaginary value.
| |
| Implicit(Double) |
Casts a real number to a DoubleComplex type.
| |
| Increment(DoubleComplex) |
Increments the real part of a DoubleComplex number
by one.
| |
| Increment(DoubleComplex) |
Increments the real part of a DoubleComplex number
by one.
| |
| Inequality(DoubleComplex, DoubleComplex) |
Compares two DoubleComplex numbers for inequality.
| |
| Inequality(DoubleComplex, Double) |
Compares a DoubleComplex number and a real number
for inequality.
| |
| Inequality(Double, DoubleComplex) |
Compares a DoubleComplex number and a real number
for inequality.
| |
| IsInfinity(DoubleComplex) |
Indicates whether a DoubleComplex number is
infinite.
| |
| IsNaN(DoubleComplex) |
Indicates whether a DoubleComplex number is
undefined.
| |
| Log(DoubleComplex) |
Returns the natural logarithm of a DoubleComplex number.
| |
| Log(DoubleComplex, DoubleComplex) |
Returns the logarithm of a DoubleComplex number
to the specified base.
| |
| Log10(DoubleComplex) |
Returns the base 10 logarithm of a DoubleComplex number.
| |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| Multiply(DoubleComplex, DoubleComplex) |
Multiplies two DoubleComplex numbers.
| |
| Multiply(Double, DoubleComplex) |
Multiplies a DoubleComplex number and a real number.
| |
| Multiply(DoubleComplex, Double) |
Multiplies a DoubleComplex number and a real number.
| |
| Multiply(DoubleComplex, DoubleComplex) |
Multiplies two DoubleComplex numbers.
| |
| Multiply(Double, DoubleComplex) |
Multiplies a DoubleComplex number and a real number.
| |
| Multiply(DoubleComplex, Double) |
Multiplies a DoubleComplex number and a real number.
| |
| Negate(DoubleComplex) |
Negates a DoubleComplex number.
| |
| Plus(DoubleComplex) |
Applies the unary plus operator to a DoubleComplex number.
| |
| Pow(DoubleComplex, DoubleComplex) |
Returns a DoubleComplex number raised to the specified
power.
| |
| Pow(DoubleComplex, Double) |
Returns a DoubleComplex number raised to the specified
power.
| |
| Pow(DoubleComplex, Int32) |
Returns a DoubleComplex number raised to the specified
integer power.
| |
| RootOfUnity(Int32, Int32) |
Returns a complex number that is the ith
root of unity of the specified degree.
| |
| Sin(DoubleComplex) |
Gets the sine of a DoubleComplex number.
| |
| Sinh(DoubleComplex) |
Gets the hyperbolic sine of a DoubleComplex number.
| |
| Sqrt(DoubleComplex) |
Returns the first square root of a DoubleComplex number.
| |
| Sqrt(Double) |
Returns the first square root of a real number.
| |
| Subtract(DoubleComplex, DoubleComplex) |
Subtracts two DoubleComplex numbers.
| |
| Subtract(DoubleComplex, Double) |
Subtracts a real number from a DoubleComplex number.
| |
| Subtract(Double, DoubleComplex) |
Subtracts a DoubleComplex number from a real number.
| |
| Subtraction(DoubleComplex, DoubleComplex) |
Subtracts two DoubleComplex numbers.
| |
| Subtraction(DoubleComplex, Double) |
Subtracts a real number from a DoubleComplex number.
| |
| Subtraction(Double, DoubleComplex) |
Subtracts a DoubleComplex number from a real number.
| |
| Tan(DoubleComplex) |
Gets the tangent of a DoubleComplex number.
| |
| Tanh(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.
| |
| UnaryNegation(DoubleComplex) |
Negates a DoubleComplex number.
| |
| UnaryPlus(DoubleComplex) |
Applies the unary plus operator to a DoubleComplex number.
|
Fields
| Icon | Type | Description |
|---|---|---|
| I |
Represents the square root of -1.
| |
| Infinity |
Represents complex infinity.
| |
| NaN |
Represents complex NaN, or Not a Number.
| |
| One |
Represents the complex number one.
| |
| Zero |
Represents the complex number zero.
|
Constructors
| Icon | Type | Description |
|---|---|---|
| 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
| Icon | Type | Description |
|---|---|---|
| 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
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.