Click or drag to resize
Complex Structure
Set of mathematical functions for complex numbers. It provides the basic operations (addition, subtraction, multiplication, division) as well as a set of complex functions.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public struct Complex : IComparable, IFormattable

The Complex type exposes the following members.

Constructors
  NameDescription
Public methodComplex(Double)
Constructs a Complex with a zero imaginary part.
Public methodComplex(Complex)
Constructs a Complex equal to the argument.
Public methodComplex(Double, Double)
Constructs a Complex with real and imaginary parts given by the input arguments.
Top
Methods
  NameDescription
Public methodStatic memberAbs
Returns the absolute value (modulus) of a Complex, |z|.
Public methodStatic memberAcos
Returns the inverse cosine (arc cosine) of a Complex, with branch cuts outside the interval [-1,1] along the real axis.
Public methodStatic memberAcosh
Returns the inverse hyperbolic cosine (arc cosh) of a Complex, with a branch cut at values less than one along the real axis.
Public methodStatic memberAdd(Double, Complex)
Returns the sum of a double and a Complex, x+y.
Public methodStatic memberAdd(Complex, Complex)
Returns the sum of two Complex objects, x+y.
Public methodStatic memberAdd(Complex, Double)
Returns the sum of a Complex and a double, x+y.
Public methodStatic memberArgument
Returns the argument (phase) of a Complex, in radians, with a branch cut along the negative real axis.
Public methodStatic memberAsin
Returns the inverse sine (arc sine) of a Complex, with branch cuts outside the interval [-1,1] along the real axis.
Public methodStatic memberAsinh
Returns the inverse hyperbolic sine (arc sinh) of a Complex, with branch cuts outside the interval [-i,i].
Public methodStatic memberAtan
Returns the inverse tangent (arc tangent) of a Complex, with branch cuts outside the interval [-i,i] along the imaginary axis.
Public methodStatic memberAtanh
Returns the inverse hyperbolic tangent (arc tanh) of a Complex, with branch cuts outside the interval [-1,1] on the real axis.
Public methodCompareTo(Object)
Compares this Complex to another Object.
Public methodCompareTo(Complex)
Compares two Complex objects.
Public methodStatic memberConjugate
Returns the complex conjugate of a Complex object.
Public methodStatic memberCos
Returns the cosine of a Complex.
Public methodStatic memberCosh
Returns the hyperbolic cosh of a Complex.
Public methodStatic memberDivide(Double, Complex)
Returns the result of a double divided by a Complex object, x/y.
Public methodStatic memberDivide(Complex, Complex)
Returns the result of a Complex object divided by a Complex object, x/y.
Public methodStatic memberDivide(Complex, Double)
Returns the result of a Complex object divided by a double, x/y.
Public methodEquals
Compares this object against the specified object.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberExp
Returns the exponential of a Complex z, exp(z).
Public methodGetHashCode
Returns a hashcode for this Complex.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImag
Returns the imaginary part of a Complex object.
Public methodStatic memberImag(Complex)
Returns the imaginary part of a Complex object.
Public methodStatic memberLog
Returns the logarithm of a Complex z, with a branch cut along the negative real axis.
Public methodStatic memberMultiply(Double, Complex)
Returns the product of a double and a Complex object, x * y.
Public methodStatic memberMultiply(Complex, Complex)
Returns the product of two Complex objects, x * y.
Public methodStatic memberMultiply(Complex, Double)
Returns the product of a Complex object and a double, x * y.
Public methodStatic memberMultiplyImag(Double, Complex)
Returns the product of a pure imaginary double and a Complex object, ix * y.
Public methodStatic memberMultiplyImag(Complex, Double)
Returns the product of a Complex object and a pure imaginary double, x * iy.
Public methodStatic memberNegate
Returns the negative of a Complex object, -z.
Public methodStatic memberParse(String)
Converts the string representation of a number in a specified style to its Complex number equivalent.
Public methodStatic memberParse(String, IFormatProvider)
Converts the string representation of a number in a specified style to its Complex number equivalent.
Public methodStatic memberPow(Complex, Complex)
Returns the Complex x raised to the Complex y power.
Public methodStatic memberPow(Complex, Double)
Returns the Complex z raised to the x power, with a branch cut for the first parameter (z) along the negative real axis.
Public methodReal
Returns the real part of a Complex object.
Public methodStatic memberReal(Complex)
Returns the real part of a Complex object.
Public methodStatic memberSin
Returns the sine of a Complex.
Public methodStatic memberSinh
Returns the hyperbolic sine of a Complex.
Public methodStatic memberSqrt
Returns the square root of a Complex, with a branch cut along the negative real axis.
Public methodStatic memberSubtract(Double, Complex)
Returns the difference of a double and a Complex object, x-y.
Public methodStatic memberSubtract(Complex, Complex)
Returns the difference of two Complex objects, x-y.
Public methodStatic memberSubtract(Complex, Double)
Returns the difference of a Complex object and a double, x-y.
Public methodStatic memberTan
Returns the tangent of a Complex.
Public methodStatic memberTanh
Returns the hyperbolic tanh of a Complex.
Public methodToString
Returns a String representation for the specified Complex.
(Overrides ValueTypeToString.)
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Double, Complex)
Returns the sum of a double and a Complex, x+y.
Public operatorStatic memberAddition(Complex, Complex)
Returns the sum of two Complex objects, x+y.
Public operatorStatic memberAddition(Complex, Double)
Returns the sum of a Complex and a double, x+y.
Public operatorStatic memberDivision(Double, Complex)
Returns the result of a double divided by a Complex object, x/y.
Public operatorStatic memberDivision(Complex, Complex)
Returns the result of a Complex object divided by a Complex object, x/y.
Public operatorStatic memberDivision(Complex, Double)
Returns the result of a Complex object divided by a double, x/y.
Public operatorStatic memberEquality(Double, Complex)
Returns true if x and y are equal.
Public operatorStatic memberEquality(Complex, Complex)
Returns true if x and y are equal.
Public operatorStatic memberEquality(Complex, Double)
Returns true if x and y are equal.
Public operatorStatic memberInequality(Double, Complex)
Returns true if x and y are not equal.
Public operatorStatic memberInequality(Complex, Complex)
Returns true if x and y are not equal.
Public operatorStatic memberInequality(Complex, Double)
Returns true if x and y are not equal.
Public operatorStatic memberMultiply(Double, Complex)
Returns the product of a double and a Complex object, x * y.
Public operatorStatic memberMultiply(Complex, Complex)
Returns the product of two Complex objects, x * y.
Public operatorStatic memberMultiply(Complex, Double)
Returns the product of a Complex object and a double, x * y.
Public operatorStatic memberSubtraction(Double, Complex)
Returns the difference of a double and a Complex object, x-y.
Public operatorStatic memberSubtraction(Complex, Complex)
Returns the difference of two Complex objects, x-y.
Public operatorStatic memberSubtraction(Complex, Double)
Returns the difference of a Complex object and a double, x-y.
Public operatorStatic memberUnaryNegation
Returns the negative of a Complex object, -x.
Top
Fields
  NameDescription
Public fieldStatic memberI
The imaginary unit.
Top
Remarks

The binary operations have the form, where op is Add, Subtract, Multiply or Divide.

public static Complex op(Complex x, Complex y)   // x op y
public static Complex op(Complex x, double y)    // x op y
public static Complex op(double x, Complex y)    // x op y

Complex objects are immutable. Once created there is no way to change their value. The functions in this class follow the rules for complex arithmetic as defined C9x Annex G: IEC 559-compatible complex arithmetic. The API is not the same, but handling of infinities, NaNs, and positive and negative zeros is intended to follow the same rules.

See Also

Reference

Other Resources