BGC Tools
|
Represents a complex number with single-precision floating point components More...
Public Member Functions | |
Complex32 (float real, float imaginary) | |
Initializes a new Complex32 structure using the specified real and imaginary values. More... | |
Complex32 | Square () |
The Square (power 2) of this Complex32 More... | |
Complex32 | Rotation (float phase) |
Retuns the Complex32 number, rotated by phase radians, or exp(i*phase) More... | |
float | RealRotation (float phase) |
Retuns the real value of the Complex32 number after rotation by phase radians, or exp(i*phase) More... | |
bool | Equals (in Complex32 value) |
Returns a value that indicates whether the current instance and a specified complex number have the same value. More... | |
bool IEquatable< Complex32 >. | Equals (Complex32 other) |
Returns a value that indicates whether the current instance and a specified complex number have the same value. More... | |
override bool | Equals (object obj) |
Returns a value that indicates whether the current instance and a specified object have the same value. More... | |
override int | GetHashCode () |
Returns the hash code for the current Complex32 object. More... | |
string | ToString (string format) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format for its real and imaginary parts. More... | |
string | ToString (IFormatProvider provider) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified culture-specific formatting information. More... | |
string | ToString (string format, IFormatProvider provider) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format and culture-specific format information for its real and imaginary parts. More... | |
override string | ToString () |
Converts the value of the current complex number to its equivalent string representation in Cartesian form. More... | |
bool | IsReal () |
Gets a value indicating whether the provided Complex32 is real. More... | |
bool | IsRealNonNegative () |
Gets a value indicating whether the provided Complex32 is real and not negative, that is >= 0. More... | |
bool | IsZero () |
Gets a value indicating whether the Complex32 is zero. More... | |
bool | IsOne () |
Gets a value indicating whether the Complex32 is one. More... | |
bool | IsImaginaryOne () |
Gets a value indicating whether the Complex32 is the imaginary unit. More... | |
bool | IsInfinity () |
Gets a value indicating whether the provided Complex32 evaluates to an infinite value. More... | |
bool | IsNaN () |
Gets a value indicating whether the provided Complex32evaluates to a value that is not a number. More... | |
Complex32 | Power (in Complex32 exponent) |
Raise this Complex32 to the given value. More... | |
Complex32 | NaturalLogarithm () |
Natural Logarithm of this Complex32 (Base E). More... | |
Complex32 | CommonLogarithm () |
Common Logarithm of this Complex32 (Base 10). More... | |
Complex32 | Logarithm (float baseValue) |
Logarithm of this Complex32 with custom base. More... | |
Complex32 | Exponential () |
Exponential of this Complex32 (exp(x), E^x). More... | |
float | RealProduct (in Complex32 other) |
Returns the real component of the product of this Complex32 with other. More... | |
Complex32 | Conjugate () |
Computes the conjugate of a complex number and returns the result. More... | |
Complex32 | Reciprocal () |
Returns the multiplicative inverse of a complex number. More... | |
Complex32 | SquareRoot () |
The Square Root (power 1/2) of this Complex32 More... | |
Static Public Member Functions | |
static float | Abs (in Complex32 value) |
Gets the absolute value (or magnitude) of a complex number. More... | |
static Complex32 | Acos (in Complex32 value) |
Trigonometric principal Arc Cosine of this Complex32 number. More... | |
static Complex32 | Add (in Complex32 left, in Complex32 right) |
Returns the sum of the two Complex32 inputs More... | |
static Complex32 | Asin (in Complex32 value) |
Trigonometric principal Arc Sine of this Complex32 number. More... | |
static Complex32 | Atan (in Complex32 value) |
Trigonometric principal Arc Tangent of this Complex32 number. More... | |
static Complex32 | Conjugate (in Complex32 value) |
Computes the conjugate of a complex number and returns the result. More... | |
static Complex32 | Cos (in Complex32 value) |
Trigonometric Cosine of a Complex32 number. More... | |
static Complex32 | Cosh (in Complex32 value) |
Hyperbolic Cosine of a Complex32 number. More... | |
static Complex32 | Divide (in Complex32 dividend, in Complex32 divisor) |
Divides one complex number by another and returns the result. More... | |
static Complex32 | Exp (in Complex32 value) |
Returns e raised to the power specified by a complex number. More... | |
static Complex32 | FromPolarCoordinates (float magnitude, float phase) |
Creates a complex number from a point's polar coordinates. More... | |
static Complex32 | FromPolarCoordinates (double magnitude, double phase) |
Creates a complex number from a point's polar coordinates. More... | |
static Complex32 | Log (in Complex32 value) |
Returns the natural (base e) logarithm of a specified complex number. More... | |
static Complex32 | Log (in Complex32 value, float baseValue) |
Returns the logarithm of a specified complex number in a specified base. More... | |
static Complex32 | Log10 (in Complex32 value) |
Returns the base-10 logarithm of a specified complex number. More... | |
static Complex32 | Multiply (in Complex32 left, in Complex32 right) |
Returns the product of two complex numbers. More... | |
static Complex32 | Negate (in Complex32 value) |
Returns the additive inverse of a specified complex number. More... | |
static Complex32 | Pow (in Complex32 value, float power) |
Returns a specified complex number raised to a power specified by a float-precision floating-point number. More... | |
static Complex32 | Pow (in Complex32 value, in Complex32 power) |
Returns a specified complex number raised to a power specified by a complex number. More... | |
static Complex32 | Reciprocal (in Complex32 value) |
Returns the multiplicative inverse of a complex number. More... | |
static Complex32 | Sin (in Complex32 value) |
Trigonometric Sine of a Complex32 number. More... | |
static Complex32 | Sinh (in Complex32 value) |
Hyperbolic Sine of a Complex32 number. More... | |
static Complex32 | Sqrt (in Complex32 value) |
The Square Root of a complex number More... | |
static Complex32 | Subtract (in Complex32 left, Complex32 right) |
The difference between two Complex32 numbers; More... | |
static Complex32 | Tan (in Complex32 value) |
Trigonometric Tangent of a Complex32 number. More... | |
static Complex32 | Tanh (in Complex32 value) |
Hyperbolic Tangent of a Complex32 number. More... | |
static Complex32 | operator+ (in Complex32 left, in Complex32 right) |
Adds two complex numbers. More... | |
static Complex32 | operator- (in Complex32 value) |
Returns the additive inverse of a specified complex number. More... | |
static Complex32 | operator- (in Complex32 left, in Complex32 right) |
Subtracts a complex number from another complex number. More... | |
static Complex32 | operator* (in Complex32 left, in Complex32 right) |
Multiplies two specified complex numbers. More... | |
static Complex32 | operator/ (in Complex32 dividend, in Complex32 divisor) |
Divides a specified complex number by another specified complex number. More... | |
static bool | operator== (in Complex32 left, in Complex32 right) |
Returns a value that indicates whether two complex numbers are equal. More... | |
static bool | operator!= (in Complex32 left, in Complex32 right) |
Returns a value that indicates whether two complex numbers are not equal. More... | |
static implicit | operator Complex32 (byte value) |
Defines an implicit conversion of an unsigned byte to a complex number. More... | |
static implicit | operator Complex32 (float value) |
Defines an implicit conversion of a single-precision floating-point number to a complex number. More... | |
static implicit | operator Complex32 (double value) |
Defines an implicit conversion of a double-precision floating-point number to a complex number. More... | |
static implicit | operator Complex32 (sbyte value) |
Defines an implicit conversion of a signed byte to a complex number. More... | |
static implicit | operator Complex32 (ulong value) |
Defines an implicit conversion of a 64-bit unsigned integer to a complex number. More... | |
static implicit | operator Complex32 (uint value) |
Defines an implicit conversion of a 32-bit unsigned integer to a complex number. More... | |
static implicit | operator Complex32 (ushort value) |
Defines an implicit conversion of a 16-bit unsigned integer to a complex number. More... | |
static implicit | operator Complex32 (long value) |
Defines an implicit conversion of a 64-bit signed integer to a complex number. More... | |
static implicit | operator Complex32 (int value) |
Defines an implicit conversion of a 32-bit signed integer to a complex number. More... | |
static implicit | operator Complex32 (short value) |
Defines an implicit conversion of a 16-bit signed integer to a complex number. More... | |
static | operator Complex32 (decimal value) |
Defines an explicit conversion of a System.Decimal value to a complex number. More... | |
Data Fields | |
float | Imaginary => _imag |
Gets the imaginary component of the current System.Numerics.Complex32 object. More... | |
float | Real => _real |
Gets the real component of the current System.Numerics.Complex32 object. More... | |
float | Phase => _imag == 0f && _real < 0f ? Mathf.PI : Mathf.Atan2(_imag, _real) |
Gets the phase of a complex number in radians. More... | |
float | MagnitudeSquared => (_real * _real) + (_imag * _imag) |
Gets the squared magnitude (or squared absolute value) of a complex number. More... | |
Static Public Attributes | |
static readonly Complex32 | Zero = new Complex32(0f, 0f) |
Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to zero. More... | |
static readonly Complex32 | One = new Complex32(1f, 0f) |
Returns a new Complex32 instance with a real number equal to one and an imaginary number equal to zero. More... | |
static readonly Complex32 | ImaginaryOne = new Complex32(0f, 1f) |
Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to one. More... | |
static readonly Complex32 | PositiveInfinity = new Complex32(float.PositiveInfinity, float.PositiveInfinity) |
Returns a new Complex32 instance with real and imaginary numbers positive infinite. More... | |
static readonly Complex32 | NaN = new Complex32(float.NaN, float.NaN) |
Returns a new Complex32 instance with real and imaginary numbers not a number. More... | |
Properties | |
float | Magnitude [get] |
Gets the magnitude (or absolute value) of a complex number. More... | |
Static Private Member Functions | |
static Complex32 | InternalDiv (float a, float b, float c, float d, bool swapped) |
Helper method for dividing. More... | |
Private Attributes | |
readonly float | _real |
The real component of the complex number. More... | |
readonly float | _imag |
The imaginary component of the complex number. More... | |
Represents a complex number with single-precision floating point components
Definition at line 41 of file Complex32.cs.
|
inline |
Initializes a new Complex32 structure using the specified real and imaginary values.
Definition at line 84 of file Complex32.cs.
|
static |
Gets the absolute value (or magnitude) of a complex number.
Referenced by BGC.Mathematics.Complex32.SquareRoot().
Trigonometric principal Arc Cosine of this Complex32 number.
value | The complex value. |
Definition at line 155 of file Complex32.cs.
Returns the sum of the two Complex32 inputs
Trigonometric principal Arc Sine of this Complex32 number.
value | The complex value. |
Definition at line 176 of file Complex32.cs.
Trigonometric principal Arc Tangent of this Complex32 number.
value | The complex value. |
Definition at line 192 of file Complex32.cs.
References BGC.Mathematics.Complex32.Conjugate().
|
inline |
Common Logarithm of this Complex32 (Base 10).
Definition at line 771 of file Complex32.cs.
References BGC.Mathematics.Complex32.Log().
Referenced by BGC.Mathematics.Complex32.Cosh().
Computes the conjugate of a complex number and returns the result.
Referenced by BGC.Mathematics.Complex32.Atan(), and BGC.Mathematics.Fourier.BluesteinForward().
Complex32 BGC.Mathematics.Complex32.Conjugate | ( | ) |
Computes the conjugate of a complex number and returns the result.
Trigonometric Cosine of a Complex32 number.
value | The complex value. |
Definition at line 209 of file Complex32.cs.
References BGC.Mathematics.GeneralMath.Cosh(), and BGC.Mathematics.GeneralMath.Sinh().
Referenced by BGC.Mathematics.Complex32.Rotation().
Hyperbolic Cosine of a Complex32 number.
value | The complex value. |
Definition at line 227 of file Complex32.cs.
References BGC.Mathematics.Complex32.CommonLogarithm(), BGC.Mathematics.GeneralMath.Cosh(), BGC.Mathematics.Complex32.Exp(), BGC.Mathematics.Complex32.Exponential(), BGC.Mathematics.Complex32.Logarithm(), BGC.Mathematics.Complex32.NaturalLogarithm(), BGC.Mathematics.Complex32.Power(), BGC.Mathematics.Complex32.Reciprocal(), and BGC.Mathematics.GeneralMath.Sinh().
|
static |
Divides one complex number by another and returns the result.
|
inline |
Returns a value that indicates whether the current instance and a specified complex number have the same value.
Definition at line 477 of file Complex32.cs.
References BGC.Mathematics.GeneralMath.Approximately().
bool IEquatable<Complex32>. BGC.Mathematics.Complex32.Equals | ( | Complex32 | other | ) |
Returns a value that indicates whether the current instance and a specified complex number have the same value.
override bool BGC.Mathematics.Complex32.Equals | ( | object | obj | ) |
Returns a value that indicates whether the current instance and a specified object have the same value.
Returns e raised to the power specified by a complex number.
Referenced by BGC.Mathematics.Complex32.Cosh(), BGC.Mathematics.Complex32.Exponential(), BGC.Mathematics.Complex32.Sinh(), and BGC.Mathematics.Complex32.Tanh().
|
inline |
Exponential of this Complex32 (exp(x), E^x).
Definition at line 793 of file Complex32.cs.
References BGC.Mathematics.Complex32._real, and BGC.Mathematics.Complex32.Exp().
Referenced by BGC.Mathematics.Complex32.Cosh().
|
static |
Creates a complex number from a point's polar coordinates.
|
static |
Creates a complex number from a point's polar coordinates.
|
inline |
Returns the hash code for the current Complex32 object.
Definition at line 506 of file Complex32.cs.
|
inlinestaticprivate |
Helper method for dividing.
a | Re first |
b | Im first |
c | Re second |
d | Im second |
Definition at line 875 of file Complex32.cs.
bool BGC.Mathematics.Complex32.IsImaginaryOne | ( | ) |
Gets a value indicating whether the Complex32 is the imaginary unit.
bool BGC.Mathematics.Complex32.IsInfinity | ( | ) |
Gets a value indicating whether the provided Complex32 evaluates to an infinite value.
True if it either evaluates to a complex infinity or to a directed infinity.
bool BGC.Mathematics.Complex32.IsNaN | ( | ) |
Gets a value indicating whether the provided Complex32evaluates to a value that is not a number.
bool BGC.Mathematics.Complex32.IsOne | ( | ) |
Gets a value indicating whether the Complex32 is one.
bool BGC.Mathematics.Complex32.IsReal | ( | ) |
Gets a value indicating whether the provided Complex32 is real.
bool BGC.Mathematics.Complex32.IsRealNonNegative | ( | ) |
Gets a value indicating whether the provided Complex32 is real and not negative, that is >= 0.
bool BGC.Mathematics.Complex32.IsZero | ( | ) |
Gets a value indicating whether the Complex32 is zero.
Returns the natural (base e) logarithm of a specified complex number.
Referenced by BGC.Mathematics.Complex32.CommonLogarithm().
Returns the logarithm of a specified complex number in a specified base.
Returns the base-10 logarithm of a specified complex number.
Complex32 BGC.Mathematics.Complex32.Logarithm | ( | float | baseValue | ) |
Logarithm of this Complex32 with custom base.
Referenced by BGC.Mathematics.Complex32.Cosh().
|
static |
Returns the product of two complex numbers.
|
inline |
Natural Logarithm of this Complex32 (Base E).
Definition at line 757 of file Complex32.cs.
Referenced by BGC.Mathematics.Complex32.Cosh().
Returns the additive inverse of a specified complex number.
|
static |
Defines an implicit conversion of an unsigned byte to a complex number.
|
static |
Defines an implicit conversion of a single-precision floating-point number to a complex number.
|
static |
Defines an implicit conversion of a double-precision floating-point number to a complex number.
value |
|
static |
Defines an implicit conversion of a signed byte to a complex number.
|
static |
Defines an implicit conversion of a 64-bit unsigned integer to a complex number.
|
static |
Defines an implicit conversion of a 32-bit unsigned integer to a complex number.
|
static |
Defines an implicit conversion of a 16-bit unsigned integer to a complex number.
|
static |
Defines an implicit conversion of a 64-bit signed integer to a complex number.
|
static |
Defines an implicit conversion of a 32-bit signed integer to a complex number.
|
static |
Defines an implicit conversion of a 16-bit signed integer to a complex number.
|
explicitstatic |
Defines an explicit conversion of a System.Decimal value to a complex number.
Returns a value that indicates whether two complex numbers are not equal.
|
static |
Multiplies two specified complex numbers.
|
static |
Adds two complex numbers.
Returns the additive inverse of a specified complex number.
|
static |
Subtracts a complex number from another complex number.
|
inlinestatic |
Divides a specified complex number by another specified complex number.
Definition at line 566 of file Complex32.cs.
References BGC.Mathematics.Complex32.Real.
Returns a value that indicates whether two complex numbers are equal.
Returns a specified complex number raised to a power specified by a float-precision floating-point number.
Returns a specified complex number raised to a power specified by a complex number.
Raise this Complex32 to the given value.
exponent | The exponent. |
Definition at line 726 of file Complex32.cs.
References BGC.Mathematics.Complex32.Imaginary.
Referenced by BGC.Mathematics.Complex32.Cosh().
float BGC.Mathematics.Complex32.RealProduct | ( | in Complex32 | other | ) |
Returns the real component of the product of this Complex32 with other.
float BGC.Mathematics.Complex32.RealRotation | ( | float | phase | ) |
Retuns the real value of the Complex32 number after rotation by phase radians, or exp(i*phase)
Returns the multiplicative inverse of a complex number.
Referenced by BGC.Mathematics.Complex32.Cosh().
Complex32 BGC.Mathematics.Complex32.Reciprocal | ( | ) |
Returns the multiplicative inverse of a complex number.
|
inline |
Retuns the Complex32 number, rotated by phase radians, or exp(i*phase)
Definition at line 459 of file Complex32.cs.
References BGC.Mathematics.Complex32.Cos(), and BGC.Mathematics.Complex32.Sin().
Trigonometric Sine of a Complex32 number.
value | The complex value. |
Definition at line 318 of file Complex32.cs.
References BGC.Mathematics.GeneralMath.Cosh(), and BGC.Mathematics.GeneralMath.Sinh().
Referenced by BGC.Mathematics.Complex32.Rotation().
Hyperbolic Sine of a Complex32 number.
value | The complex value. |
Definition at line 336 of file Complex32.cs.
References BGC.Mathematics.GeneralMath.Cosh(), BGC.Mathematics.Complex32.Exp(), and BGC.Mathematics.GeneralMath.Sinh().
The Square Root of a complex number
|
inline |
The Square (power 2) of this Complex32
Definition at line 365 of file Complex32.cs.
References BGC.Mathematics.Complex32.SquareRoot().
|
inline |
The Square Root (power 1/2) of this Complex32
Definition at line 829 of file Complex32.cs.
References BGC.Mathematics.Complex32.Abs().
Referenced by BGC.Mathematics.Complex32.Square().
The difference between two Complex32 numbers;
Trigonometric Tangent of a Complex32 number.
value | The complex value. |
Definition at line 394 of file Complex32.cs.
Referenced by BGC.Mathematics.Complex32.Tanh().
Hyperbolic Tangent of a Complex32 number.
value | The complex value. |
Definition at line 413 of file Complex32.cs.
References BGC.Mathematics.GeneralMath.Cosh(), BGC.Mathematics.Complex32.Exp(), BGC.Mathematics.GeneralMath.Sinh(), BGC.Mathematics.Complex32.Tan(), and BGC.Mathematics.GeneralMath.Tanh().
string BGC.Mathematics.Complex32.ToString | ( | string | format | ) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format for its real and imaginary parts.
string BGC.Mathematics.Complex32.ToString | ( | IFormatProvider | provider | ) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified culture-specific formatting information.
string BGC.Mathematics.Complex32.ToString | ( | string | format, |
IFormatProvider | provider | ||
) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format and culture-specific format information for its real and imaginary parts.
override string BGC.Mathematics.Complex32.ToString | ( | ) |
Converts the value of the current complex number to its equivalent string representation in Cartesian form.
|
private |
The imaginary component of the complex number.
Definition at line 53 of file Complex32.cs.
|
private |
The real component of the complex number.
Definition at line 47 of file Complex32.cs.
Referenced by BGC.Mathematics.Complex32.Exponential().
float BGC.Mathematics.Complex32.Imaginary => _imag |
Gets the imaginary component of the current System.Numerics.Complex32 object.
Definition at line 93 of file Complex32.cs.
Referenced by BGC.Mathematics.Complex64.operator/(), and BGC.Mathematics.Complex32.Power().
Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to one.
Definition at line 69 of file Complex32.cs.
Gets the squared magnitude (or squared absolute value) of a complex number.
Definition at line 715 of file Complex32.cs.
Returns a new Complex32 instance with real and imaginary numbers not a number.
Definition at line 79 of file Complex32.cs.
Returns a new Complex32 instance with a real number equal to one and an imaginary number equal to zero.
Definition at line 64 of file Complex32.cs.
float BGC.Mathematics.Complex32.Phase => _imag == 0f && _real < 0f ? Mathf.PI : Mathf.Atan2(_imag, _real) |
Gets the phase of a complex number in radians.
Definition at line 142 of file Complex32.cs.
|
static |
Returns a new Complex32 instance with real and imaginary numbers positive infinite.
Definition at line 74 of file Complex32.cs.
float BGC.Mathematics.Complex32.Real => _real |
Gets the real component of the current System.Numerics.Complex32 object.
Definition at line 98 of file Complex32.cs.
Referenced by BGC.Mathematics.Complex64.operator/(), and BGC.Mathematics.Complex32.operator/().
Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to zero.
Definition at line 59 of file Complex32.cs.
|
get |
Gets the magnitude (or absolute value) of a complex number.
Definition at line 104 of file Complex32.cs.