Complex.Subtraction Operator

Definition

Subtraherar ett angivet tal från ett annat angivet tal, där minst ett av dem är ett komplext tal, och det andra kan vara ett reellt tal med dubbel precision.

Överlagringar

Name Description
Subtraction(Double, Complex)

Subtraherar ett komplext tal från ett reellt tal med dubbel precision.

Subtraction(Complex, Double)

Subtraherar ett reellt tal med dubbel precision från ett komplext tal.

Subtraction(Complex, Complex)

Subtraherar ett komplext tal från ett annat komplext tal.

Kommentarer

Operatorn Subtraction tillåter att du utför subtraktionsåtgärder som omfattar komplexa tal. Den aktiverar kod, till exempel följande:

System.Numerics.Complex c1 = new System.Numerics.Complex(6.7, -1.3);
System.Numerics.Complex c2 = new System.Numerics.Complex(1.4, 3.8);
System.Numerics.Complex result = c1 - c2;
Console.WriteLine("{0} - {1} = {2}", c1, c2, result);
// The example displays the following output:
//       (6.7, -1.3); - (1.4, 3.8); = (5.3, -5.1)
let c1 = System.Numerics.Complex(6.7, -1.3)
let c2 = System.Numerics.Complex(1.4, 3.8)
let result = c1 - c2
printfn $"{c1}; - {c2}; = {result}"
// The example displays the following output:
//       (6.7, -1.3); - (1.4, 3.8); = (5.3, -5.1)
Dim c1 As New System.Numerics.Complex(6.7, -1.3)
Dim c2 As New System.Numerics.Complex(1.4, 3.8)
Dim result As System.Numerics.Complex = c1 - c2
Console.WriteLine("{0} - {1} = {2}", c1, c2, result)
' The example displays the following output:
'       (6.7, -1.3) - (1.4, 3.8) = (5.3, -5.1)

Om subtraktionen resulterar i ett spill i antingen den verkliga eller imaginära komponenten är värdet för komponenten antingen Double.PositiveInfinity eller Double.NegativeInfinity.

Språk som inte stöder anpassade operatorer kan anropa Subtract motsvarande grupp med metoder i stället.

De Addition operatorer som tar emot en dubbel är effektivare än de operatorer som tar emot två komplexa tal.

Subtraction(Double, Complex)

Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs

Subtraherar ett komplext tal från ett reellt tal med dubbel precision.

public:
 static System::Numerics::Complex operator -(double left, System::Numerics::Complex right);
public static System.Numerics.Complex operator -(double left, System.Numerics.Complex right);
static member ( - ) : double * System.Numerics.Complex -> System.Numerics.Complex
Public Shared Operator - (left As Double, right As Complex) As Complex

Parametrar

left
Double

Det verkliga värdet med dubbel precision att subtrahera från (minuend).

right
Complex

Det komplexa värde som ska subtraheras (subtrahend).

Returer

Resultatet av att subtrahera right från left, som ett komplext tal.

Kommentarer

Subtraktionen av ett komplext tal (c + di) från ett verkligt tal (som kan betraktas som det komplexa talet a + 0i) har följande form:

$(a - c) - di$

Språk som inte stöder anpassade operatorer kan anropa Complex.Subtract(Double, Complex) metoden i stället.

Se även

Gäller för

Subtraction(Complex, Double)

Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs

Subtraherar ett reellt tal med dubbel precision från ett komplext tal.

public:
 static System::Numerics::Complex operator -(System::Numerics::Complex left, double right);
public static System.Numerics.Complex operator -(System.Numerics.Complex left, double right);
static member ( - ) : System.Numerics.Complex * double -> System.Numerics.Complex
Public Shared Operator - (left As Complex, right As Double) As Complex

Parametrar

left
Complex

Det komplexa värde som du ska subtrahera från (minuend).

right
Double

Det verkliga värdet med dubbel precision för att subtrahera (subtrahend).

Returer

Resultatet av att subtrahera right från left, som ett komplext tal.

Kommentarer

Subtraktionen av ett verkligt tal (som kan betraktas som det komplexa talet c + 0i) från ett komplext tal (a + bi) har följande form:

$(a - c) + bi$

Språk som inte stöder anpassade operatorer kan anropa Complex.Subtract(Complex, Double) metoden i stället.

Se även

Gäller för

Subtraction(Complex, Complex)

Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs
Källa:
Complex.cs

Subtraherar ett komplext tal från ett annat komplext tal.

public:
 static System::Numerics::Complex operator -(System::Numerics::Complex left, System::Numerics::Complex right);
public:
 static System::Numerics::Complex operator -(System::Numerics::Complex left, System::Numerics::Complex right) = System::Numerics::ISubtractionOperators<System::Numerics::Complex, System::Numerics::Complex, System::Numerics::Complex>::op_Subtraction;
public static System.Numerics.Complex operator -(System.Numerics.Complex left, System.Numerics.Complex right);
static member ( - ) : System.Numerics.Complex * System.Numerics.Complex -> System.Numerics.Complex
Public Shared Operator - (left As Complex, right As Complex) As Complex

Parametrar

left
Complex

Värdet som ska subtraheras från (minuend).

right
Complex

Värdet som ska subtraheras (subtrahend).

Returer

Resultatet av att subtrahera right från left.

Implementeringar

Kommentarer

Subtraktionen av ett komplext tal, , c + difrån ett annat komplext tal, a + bi, har följande form:

$(a - c) + (b - d)i$

Språk som inte stöder anpassade operatorer kan anropa Complex.Subtract(Complex, Complex) metoden i stället.

Se även

Gäller för