Complex |
[SerializableAttribute] public readonly struct Complex32 : IFormattable, IEquatable<Complex32>
The Complex32 type exposes the following members.
Name | Description | |
---|---|---|
Complex32 | Initializes a new instance of the Complex32 structure with the given real and imaginary parts. |
Name | Description | |
---|---|---|
Imaginary | Gets the real imaginary component of the complex number. | |
Magnitude | Gets the magnitude (or absolute value) of a complex number. | |
MagnitudeSquared | Gets the squared magnitude (or squared absolute value) of a complex number. | |
Phase | Gets the phase or argument of this Complex32. | |
Real | Gets the real component of the complex number. | |
Sign | Gets the unity of this complex (same argument, but on the unit circle; exp(I*arg)) |
Name | Description | |
---|---|---|
Abs | Gets the absolute value (or magnitude) of a complex number. | |
Acos | Returns the angle that is the arc cosine of the specified complex number. | |
Add | Adds two complex numbers and returns the result. | |
Asin | Returns the angle that is the arc sine of the specified complex number. | |
Atan | Returns the angle that is the arc tangent of the specified complex number. | |
CommonLogarithm | Common Logarithm of this Complex32 (Base 10). | |
Conjugate | Computes the conjugate of a complex number and returns the result. | |
Conjugate(Complex32) | Computes the conjugate of a complex number and returns the result. | |
Cos | Returns the cosine of the specified complex number. | |
Cosh | Returns the hyperbolic cosine of the specified complex number. | |
CubicRoots | Evaluate all cubic roots of this Complex32. | |
Divide | Divides one complex number by another and returns the result. | |
Equals(Complex32) | Checks if two complex numbers are equal. Two complex numbers are equal if their corresponding real and imaginary components are equal. | |
Equals(Object) |
Checks if two complex numbers are equal. Two complex numbers are equal if their
corresponding real and imaginary components are equal.
(Overrides ValueTypeEquals(Object)) | |
Exp | Returns e raised to the power specified by a complex number. | |
Exponential | Exponential of this Complex32 (exp(x), E^x). | |
FromPolarCoordinates | Creates a complex number from a point's polar coordinates. | |
GetHashCode |
The hash code for the complex number.
(Overrides ValueTypeGetHashCode) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
IsImaginaryOne | Gets a value indicating whether the Complex32 is the imaginary unit. | |
IsInfinity | Gets a value indicating whether the provided Complex32 evaluates to an infinite value. | |
IsNaN | Gets a value indicating whether the provided Complex32evaluates to a value that is not a number. | |
IsOne | Gets a value indicating whether the Complex32 is one. | |
IsReal | Gets a value indicating whether the provided Complex32 is real. | |
IsRealNonNegative | Gets a value indicating whether the provided Complex32 is real and not negative, that is >= 0. | |
IsZero | Gets a value indicating whether the Complex32 is zero. | |
Log(Complex32) | Returns the natural (base e) logarithm of a specified complex number. | |
Log(Complex32, Single) | Returns the logarithm of a specified complex number in a specified base. | |
Log10 | Returns the base-10 logarithm of a specified complex number. | |
Logarithm | Logarithm of this Complex32 with custom base. | |
Multiply | Returns the product of two complex numbers. | |
NaturalLogarithm | Natural Logarithm of this Complex32 (Base E). | |
Negate | Returns the additive inverse of a specified complex number. | |
Parse | Creates a complex number based on a string. The string can be in the following formats (without the quotes): 'n', 'ni', 'n +/- ni', 'ni +/- n', 'n,n', 'n,ni,' '(n,n)', or '(n,ni)', where n is a float. | |
Pow(Complex32, Complex32) | Returns a specified complex number raised to a power specified by a complex number. | |
Pow(Complex32, Single) | Returns a specified complex number raised to a power specified by a single-precision floating-point number. | |
Power | Raise this Complex32 to the given value. | |
Reciprocal | Returns the multiplicative inverse of a complex number. | |
Reciprocal(Complex32) | Returns the multiplicative inverse of a complex number. | |
Root | Raise this Complex32 to the inverse of the given value. | |
Sin | Returns the sine of the specified complex number. | |
Sinh | Returns the hyperbolic sine of the specified complex number. | |
Sqrt | Returns the square root of a specified complex number. | |
Square | The Square (power 2) of this Complex32 | |
SquareRoot | The Square Root (power 1/2) of this Complex32 | |
SquareRoots | Evaluate all square roots of this Complex32. | |
Subtract | Subtracts one complex number from another and returns the result. | |
Tan | Returns the tangent of the specified complex number. | |
Tanh | Returns the hyperbolic tangent of the specified complex number. | |
ToComplex | Converts this Complex32 to a Complex. | |
ToString |
Converts the value of the current complex number to its equivalent string representation in Cartesian form.
(Overrides ValueTypeToString) | |
ToString(IFormatProvider) | Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified culture-specific formatting information. | |
ToString(String) | 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. | |
ToString(String, IFormatProvider) | 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. | |
TryParse(String, Complex32) | Converts the string representation of a complex number to a single-precision complex number equivalent. A return value indicates whether the conversion succeeded or failed. | |
TryParse(String, IFormatProvider, Complex32) | Converts the string representation of a complex number to single-precision complex number equivalent. A return value indicates whether the conversion succeeded or failed. |
Name | Description | |
---|---|---|
Addition(Complex32, Complex32) | Addition operator. Adds two complex numbers together. | |
Addition(Complex32, Single) | Addition operator. Adds a complex number and float together. | |
Addition(Single, Complex32) | Addition operator. Adds a complex number and float together. | |
Division(Complex32, Complex32) | Division operator. Divides a complex number by another. | |
Division(Complex32, Single) | Division operator. Divides a complex number by a float value. | |
Division(Single, Complex32) | Division operator. Divides a float value by a complex number. | |
Equality(Complex32, Complex32) | Equality test. | |
(Complex to Complex32) | Explicit conversion of a Complex to a Complex32. | |
(Decimal to Complex32) | Explicit conversion of a real decimal to a Complex32. | |
(Double to Complex32) | Implicit conversion of a real double to a Complex32. | |
(BigInteger to Complex32) | Implicit conversion of a BigInteger int to a Complex32. | |
(Byte to Complex32) | Implicit conversion of a real byte to a Complex32. | |
(Int16 to Complex32) | Implicit conversion of a real short to a Complex32. | |
(Int32 to Complex32) | Implicit conversion of a real int to a Complex32. | |
(Int64 to Complex32) | Implicit conversion of a real long to a Complex32. | |
(SByte to Complex32) | Implicit conversion of a signed byte to a Complex32. | |
(Single to Complex32) | Implicit conversion of a real float to a Complex32. | |
(UInt16 to Complex32) | Implicit conversion of a unsigned real short to a Complex32. | |
(UInt32 to Complex32) | Implicit conversion of a real uint to a Complex32. | |
(UInt64 to Complex32) | Implicit conversion of a real ulong to a Complex32. | |
Inequality(Complex32, Complex32) | Inequality test. | |
Multiply(Complex32, Complex32) | Multiplication operator. Multiplies two complex numbers. | |
Multiply(Complex32, Single) | Multiplication operator. Multiplies a complex number with a float value. | |
Multiply(Single, Complex32) | Multiplication operator. Multiplies a complex number with a float value. | |
Subtraction(Complex32, Complex32) | Subtraction operator. Subtracts two complex numbers. | |
Subtraction(Complex32, Single) | Subtraction operator. Subtracts float value from a complex value. | |
Subtraction(Single, Complex32) | Subtraction operator. Subtracts complex value from a float value. | |
UnaryNegation(Complex32) | Unary minus. | |
UnaryPlus(Complex32) | Unary addition. |
Name | Description | |
---|---|---|
ImaginaryOne | Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to one. | |
NaN | Returns a new Complex32 instance with real and imaginary numbers not a number. | |
One | Returns a new Complex32 instance with a real number equal to one and an imaginary number equal to zero. | |
PositiveInfinity | Returns a new Complex32 instance with real and imaginary numbers positive infinite. | |
Zero | Returns a new Complex32 instance with a real number equal to zero and an imaginary number equal to zero. |
Name | Description | |
---|---|---|
AlmostEqual |
Checks whether two Complex numbers are almost equal.
(Defined by Precision) | |
AlmostEqual |
Compares two complex and determines if they are equal within
the specified maximum error.
(Defined by Precision) | |
AlmostEqual |
Compares two doubles and determines if they are equal to within the specified number of decimal places or not, using the
number of decimal places as an absolute measure.
(Defined by Precision) | |
AlmostEqualRelative |
Checks whether two Complex numbers are almost equal.
(Defined by Precision) | |
AlmostEqualRelative |
Compares two complex and determines if they are equal within
the specified maximum error.
(Defined by Precision) | |
AlmostEqualRelative |
Compares two doubles and determines if they are equal to within the specified number of decimal places or not. If the numbers
are very close to zero an absolute difference is compared, otherwise the relative difference is compared.
(Defined by Precision) | |
MagnitudeSquared |
Gets the squared magnitude of the Complex number.
(Defined by ComplexExtensions) | |
Norm |
Returns a Norm of a value of this type, which is appropriate for measuring how
close this value is to zero.
(Defined by ComplexExtensions) | |
NormOfDifference |
Returns a Norm of the difference of two values of this type, which is
appropriate for measuring how close together these two values are.
(Defined by ComplexExtensions) |
The class Complex32 provides all elementary operations on complex numbers. All the operators +, -, *, /, ==, != are defined in the canonical way. Additional complex trigonometric functions are also provided. Note that the Complex32 structures has two special constant values NaN and PositiveInfinity.
Complex32 x = new Complex32(1f,2f); Complex32 y = Complex32.FromPolarCoordinates(1f, Math.Pi); Complex32 z = (x + y) / (x - y);
For mathematical details about complex numbers, please have a look at the Wikipedia