Complex.Subtract メソッド

オーバーロード

 倍精度実数から複素数を減算し、その結果を返します。Subtracts one complex number from a double-precision real number and returns the result. 複素数から倍精度実数を減算し、その結果を返します。Subtracts one double-precision real number from a complex number and returns the result. 複素数を別の複素数から減算し、その結果を返します。Subtracts one complex number from another and returns the result.

例

``````using System;
using System.Numerics;

public class Example
{
public static void Main()
{
Complex c1 = new Complex(4.93, 6.87);
Complex[] values = { new Complex(12.5, 9.6),
new Complex(4.3, -8.1),
new Complex(-1.9, 7.4),
new Complex(-5.3, -6.6) };

foreach (var c2 in values)
Console.WriteLine("{0} - {1} = {2}", c1, c2,
Complex.Subtract(c1, c2));
}
}
// The example displays the following output:
//       (4.93, 6.87) - (12.5, 9.6) = (-7.57, -2.73)
//       (4.93, 6.87) - (4.3, -8.1) = (0.63, 14.97)
//       (4.93, 6.87) - (-1.9, 7.4) = (6.83, -0.53)
//       (4.93, 6.87) - (-5.3, -6.6) = (10.23, 13.47)
``````
``````Imports System.Numerics

Module Example
Public Sub Main()
Dim c1 As New Complex(4.93, 6.87)
Dim values() As Complex = { New Complex(12.5, 9.6),
New Complex(4.3, -8.1),
New Complex(-1.9, 7.4),
New Complex(-5.3, -6.6) }

For Each c2 In values
Console.WriteLine("{0} - {1} = {2}", c1, c2,
Complex.Subtract(c1, c2))
Next
End Sub
End Module
' The example displays the following output:
'       (4.93, 6.87) - (12.5, 9.6) = (-7.57, -2.73)
'       (4.93, 6.87) - (4.3, -8.1) = (0.63, 14.97)
'       (4.93, 6.87) - (-1.9, 7.4) = (6.83, -0.53)
'       (4.93, 6.87) - (-5.3, -6.6) = (10.23, 13.47)
``````

注釈

メソッドSubtractでは、複素数を含む減算演算を実行できます。The Subtract method allows subtraction operations that involve complex numbers.

カスタム演算子をサポートする言語でもSubtraction 、同等の演算子グループを使用できます。Languages that support custom operators can use the Subtraction equivalent group of operators too.

1 Subtractつの double を受け取るメソッドは、2つの複素数を受け取るメソッドよりも効率的です。The Subtract methods that receive one double are more efficient than the method that receive two Complex numbers.

Subtract(Double, Complex)

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

left
Double

right
Complex

戻り値

`right` から `left` を減算した、複素数としての結果。The result of subtracting `right` from `left`, as a complex number.

注釈

(a-c)-di(a - c) - di

カスタム演算子をサポートする言語でもComplex.Subtraction(Double, Complex) 、同等の演算子を使用できます。Languages that support custom operators can use the Complex.Subtraction(Double, Complex) equivalent operator too.

Subtract(Complex, Double)

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

left
Complex

right
Double

戻り値

`right` から `left` を減算した、複素数としての結果。The result of subtracting `right` from `left`, as a complex number.

注釈

(a-c) + bi(a - c) + bi

カスタム演算子をサポートする言語でもComplex.Subtraction(Complex, Double) 、同等の演算子を使用できます。Languages that support custom operators can use the Complex.Subtraction(Complex, Double) equivalent operator too.

Subtract(Complex, Complex)

``````public:
static System::Numerics::Complex Subtract(System::Numerics::Complex left, System::Numerics::Complex right);``````
``public static System.Numerics.Complex Subtract (System.Numerics.Complex left, System.Numerics.Complex right);``
``static member Subtract : System.Numerics.Complex * System.Numerics.Complex -> System.Numerics.Complex``
``Public Shared Function Subtract (left As Complex, right As Complex) As Complex``

left
Complex

right
Complex

戻り値

`right` から `left` を減算した結果。The result of subtracting `right` from `left`.

注釈

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

カスタム演算子をサポートする言語でもComplex.Subtraction(Complex, Complex) 、同等の演算子を使用できます。Languages that support custom operators can use the Complex.Subtraction(Complex, Complex) equivalent operator too.