Complex.Subtract Complex.Subtract Complex.Subtract Complex.Subtract Method

定義

オーバーロード

Subtract(Double, Complex) Subtract(Double, Complex) Subtract(Double, Complex) Subtract(Double, Complex)
Subtract(Complex, Double) Subtract(Complex, Double) Subtract(Complex, Double) Subtract(Complex, Double)
Subtract(Complex, Complex) Subtract(Complex, Complex) Subtract(Complex, Complex) Subtract(Complex, Complex)

複素数を別の複素数から減算し、その結果を返します。Subtracts one complex number from another and returns the result.

Subtract(Double, Complex) Subtract(Double, Complex) Subtract(Double, Complex) 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

パラメーター

戻り値

Subtract(Complex, Double) Subtract(Complex, Double) Subtract(Complex, Double) 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

パラメーター

戻り値

Subtract(Complex, Complex) Subtract(Complex, Complex) Subtract(Complex, Complex) Subtract(Complex, Complex)

複素数を別の複素数から減算し、その結果を返します。Subtracts one complex number from another and returns the result.

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 Complex Complex Complex

減算される値 (被減数)。The value to subtract from (the minuend).

right
Complex Complex Complex Complex

減算する値 (減数)。The value to subtract (the subtrahend).

戻り値

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

次の例では、複素数から、配列のそれぞれの複雑な数値を減算します。The following example subtracts each complex number in an array from a complex number.

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)

注釈

複素数、c + di は、別の複素数から減算、+、bi は次の形式になります。The subtraction of a complex number, c + di, from another complex number, a + bi, takes the following form:

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

そのコンポーネントの値がいずれかの場合は、メソッドのいずれかでオーバーフローが発生、結果が実数部または虚数部のコンポーネントで呼び出し、Double.PositiveInfinityまたはDouble.NegativeInfinityします。If the method call results in an overflow in either the real or imaginary component, the value of that component is either Double.PositiveInfinity or Double.NegativeInfinity.

カスタム演算子をサポートしない言語を使用して、Subtract複素数を使用して減算を実行するメソッド。Languages that do not support custom operators can use the Subtract method to perform subtraction using complex numbers.

こちらもご覧ください

適用対象