Click or drag to resize

Complex Structure

This structure implements complex number calculations.
Inheritance Hierarchy
SystemObject
  SystemValueType
    RelaxIS_SDK.libMathComplex

Namespace: RelaxIS_SDK.libMath
Assembly: RelaxIS SDK (in RelaxIS SDK.dll) Version: 3.0.23.63
Syntax
public struct Complex

The Complex type exposes the following members.

Constructors
 NameDescription
Public methodComplex(Complex) Creates a new instance of the Complex structure.
Public methodComplex(Double) Creates a new instance of the Complex structure.
Public methodComplex(Double, Double) Creates a new instance of the Complex structure.
Top
Properties
 NameDescription
Public propertyArgument The argument of the complex number, aka Atan2(Im/Re)
Public propertyStatic memberComplexE Defines E in the context of the complex structure
Public propertyStatic memberComplexInfinity Defines an infinitly high complex number
Public propertyStatic memberComplexPI Defines PI in the context of the complex structure
Public propertyImaginary The imaginary value of the complex number
Public propertyStatic memberImaginaryOne Defines the imaginary number in the context of the complex structure Equivalent to Complex.I
Public propertyMagnitude The magnitude of the complex number, aka (Re^2 + Im^2)^0.5
Public propertyReal The real value of the complex number
Top
Methods
 NameDescription
Public methodStatic memberACosh(Complex) Calculates the Arcus Kosinus Hyperbolicus of the complex number
Public methodStatic memberACosh(Double) Calculates the Arcus Kosinus Hyperbolicus of the real number
Public methodStatic memberAdd(Complex, Complex) Calculates the sum of the two numbers
Public methodStatic memberAdd(Complex, Double) Calculates the sum of the two numbers
Public methodStatic memberAdd(Double, Complex) Calculates the sum of the two numbers
Public methodStatic memberArcCos(Complex) Calculates the Arcus Kosinus of the complex number
Public methodStatic memberArcCos(Double) Calculates the Arcus Kosinus of the real number
Public methodStatic memberArcSin(Complex) Calculates the Arcus Sinus of the complex number
Public methodStatic memberArcSin(Double) Calculates the Arcus Sinus of the real number
Public methodStatic memberArcTan(Complex) Calculates the Arcus Tangens of the complex number
Public methodStatic memberArcTan(Double) Calculates the Arcus Tangens of the real number
Public methodStatic memberArg Calculates the argument of the complex number
Public methodStatic memberASinh(Complex) Calculates the Arcus Sinus Hyperbolicus of the complex number
Public methodStatic memberASinh(Double) Calculates the Arcus Sinus Hyperbolicus of the real number
Public methodStatic memberATanh(Complex) Calculates the Arcus Tangens Hyperbolicus of the complex number
Public methodStatic memberATanh(Double) Calculates the Arcus Tangens Hyperbolicus of the real number
Public methodStatic memberCos(Complex) Calculates the Cosinus of the complex number
Public methodStatic memberCos(Double) Calculates the Cosinus of the real number
Public methodStatic memberCosh(Complex) Calculates the Kosinus Hyperbolicus of the complex number
Public methodStatic memberCosh(Double) Calculates the Kosinus Hyperbolicus of the real number
Public methodStatic memberCoth(Complex) Calculates the Cotangens Hyperbolicus of the complex number
Public methodStatic memberCoth(Double) Calculates the Cotangens Hyperbolicus of the real number
Public methodStatic memberDivide(Complex, Complex) Calculates the quotient of the two numbers
Public methodStatic memberDivide(Complex, Double) Calculates the quotient of the two numbers
Public methodStatic memberDivide(Double, Complex) Calculates the quotient of the two numbers
Public methodStatic memberExp(Complex) Calculates the exponential function of the complex number (E^c)
Public methodStatic memberExp(Double) Calculates the exponential function of the real number (E^d)
Public methodStatic memberFromMagAndArg Creates a new instance of the Complex structure from Magnitude and Argument
Public methodStatic memberIsInfinity Checks if the given complex number is infinity
Public methodStatic memberLog(Complex) Calculates the natural logarithm function of the complex number
Public methodStatic memberLog(Double) Calculates the natural logarithm function of the real number
Public methodStatic memberLog10(Complex) Calculates the base-10 logarithm function of the complex number
Public methodStatic memberLog10(Double) Calculates the base-10 logarithm function of the real number
Public methodStatic memberMultiply(Complex, Complex) Calculates the product of the two numbers
Public methodStatic memberMultiply(Complex, Double) Calculates the product of the two numbers
Public methodStatic memberMultiply(Double, Complex) Calculates the product of the two numbers
Public methodStatic memberPow(Complex, Complex) Calculates the first number to the power of the second number
Public methodStatic memberPow(Complex, Double) Calculates the first number to the power of the second number
Public methodStatic memberPow(Double, Complex) Calculates the first number to the power of the second number
Public methodStatic memberPow(Double, Double) Calculates the first number to the power of the second number
Public methodStatic memberSin(Complex) Calculates the Sinus of the complex number
Public methodStatic memberSin(Double) Calculates the Sinus of the real number
Public methodStatic memberSinh(Complex) Calculates the Sinus Hyperbolicus of the complex number
Public methodStatic memberSinh(Double) Calculates the Sinus Hyperbolicus of the real number
Public methodStatic memberSqrt(Complex) Calculates the square-root of the complex number
Public methodStatic memberSqrt(Double) Calculates the square-root of the real number
Public methodStatic memberSquare Calculates the square of the complex number
Public methodStatic memberSubtract(Complex, Complex) Calculates the difference of the two numbers
Public methodStatic memberSubtract(Complex, Double) Calculates the difference of the two numbers
Public methodStatic memberSubtract(Double, Complex) Calculates the difference of the two numbers
Public methodStatic memberTan(Complex) Calculates the Tangens of the complex number
Public methodStatic memberTan(Double) Calculates the Tangens of the real number
Public methodStatic memberTanh(Complex) Calculates the Tangens Hyperbolicus of the complex number
Public methodStatic memberTanh(Double) Calculates the Tangens Hyperbolicus of the real number
Public methodToMathematica Returns the complex number in a string compatible with the Wolfram Mathematica software
Public methodToString Returns a string representation of the complex number
(Overrides ValueTypeToString)
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Complex, Complex) Calculates the sum of the two numbers
Public operatorStatic memberAddition(Complex, Double) Calculates the sum of the two numbers
Public operatorStatic memberAddition(Double, Complex) Calculates the sum of the two numbers
Public operatorStatic memberDivision(Complex, Complex) Calculates the quotient of the two numbers
Public operatorStatic memberDivision(Complex, Double) Calculates the quotient of the two numbers
Public operatorStatic memberDivision(Double, Complex) Calculates the quotient of the two numbers
Public operatorStatic memberExponent(Complex, Complex) Calculates the first number to the power of the second number
Public operatorStatic memberExponent(Complex, Double) Calculates the first number to the power of the second number
Public operatorStatic memberExponent(Double, Complex) Calculates the first number to the power of the second number
Public operatorStatic member(Double to Complex) Converts the given double value into a complex value by setting the Real part to the value and imaginary part to zero
Public operatorStatic memberMultiply(Complex, Complex) Calculates the product of the two numbers
Public operatorStatic memberMultiply(Complex, Double) Calculates the product of the two numbers
Public operatorStatic memberMultiply(Double, Complex) Calculates the product of the two numbers
Public operatorStatic memberSubtraction(Complex, Complex) Calculates the difference of the two numbers
Public operatorStatic memberSubtraction(Complex, Double) Calculates the difference of the two numbers
Public operatorStatic memberSubtraction(Double, Complex) Calculates the difference of the two numbers
Top
Fields
 NameDescription
Public fieldStatic memberE The base of the natural logarithm
Public fieldStatic memberPI The value of PI
Top
Remarks
While similar to the System.Numerics.Complex implementation, there is a crucial difference: Dividing by 0 leads to +Inf instead of Ind and dividing by Inf leads to 0 instead of Ind. The reason is, that these operations are often needed in intermediary steps for equivalent circuit calculations and provide the correct end result, even though it is mathematically not completely sound. The struct implements all common mathematical functions.
See Also