Complex.Reciprocal(Complex) Complex.Reciprocal(Complex) Complex.Reciprocal(Complex) Complex.Reciprocal(Complex) Method

定義

複素数の逆数を返します。Returns the multiplicative inverse of a complex number.

public:
 static System::Numerics::Complex Reciprocal(System::Numerics::Complex value);
public static System.Numerics.Complex Reciprocal (System.Numerics.Complex value);
static member Reciprocal : System.Numerics.Complex -> System.Numerics.Complex
Public Shared Function Reciprocal (value As Complex) As Complex

パラメーター

value
Complex Complex Complex Complex

複素数。A complex number.

戻り値

value の逆数。The reciprocal of value.

次の例では、Reciprocalいくつかの複素数の逆方向の値を計算するメソッド。The following example uses the Reciprocal method to calculate the reciprocal values of several complex numbers. 逆数を値から複素数を乗算した結果であることも示していますComplex.Oneします。It also demonstrates that the result of multiplying a complex number by its reciprocal is Complex.One.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(1, 1), 
                           new Complex(-1, 1), 
                           new Complex(10, -1),
                           new Complex(3, 5) };
      foreach (Complex value in values)
      {         
         Complex r1 = Complex.Reciprocal(value);                   
         Console.WriteLine("{0:N0} x {1:N2} = {2:N2}", 
                           value, r1, value * r1);
      }
   }
}
// The example displays the following output:
//       (1, 1) x (0.50, -0.50) = (1.00, 0.00)
//       (-1, 1) x (-0.50, -0.50) = (1.00, 0.00)
//       (10, -1) x (0.10, 0.01) = (1.00, 0.00)
//       (3, 5) x (0.09, -0.15) = (1.00, 0.00)
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim values() As Complex = { New Complex(1, 1), 
                                  New Complex(-1, 1), 
                                  New Complex(10, -1),
                                  New Complex(3, 5) }
      For Each value As Complex In values         
         Dim r1 As Complex = Complex.Reciprocal(value)                   
         Console.WriteLine("{0:N0} x {1:N2} = {2:N2}", 
                           value, r1, value * r1)
      Next
   End Sub
End Module
' The example displays the following output:
'       (1, 1) x (0.50, -0.50) = (1.00, 0.00)
'       (-1, 1) x (-0.50, -0.50) = (1.00, 0.00)
'       (10, -1) x (0.10, 0.01) = (1.00, 0.00)
'       (3, 5) x (0.09, -0.15) = (1.00, 0.00)

注釈

逆数、または、数値の逆数x数値y場所xを乗算してy 1 となります。The reciprocal, or multiplicative inverse, of a number x is a number y where x multiplied by y yields 1. 複素数の逆数が生成する複素数Complex.One2 つの数値が乗算されます。The reciprocal of a complex number is the complex number that produces Complex.One when the two numbers are multiplied. 逆数が、式で表される場合は、複素数の値は、+ bi で表される、/(、2+ b2) + b/(、2 + b2)。If a complex number is represented by a +bi, its reciprocal is represented by the expression a/(a2+b2) + -b/(a2 + b2).

値が場合Complex.Zero、メソッドを返しますComplex.Zeroします。If value is Complex.Zero, the method returns Complex.Zero. 式の結果を返しますそれ以外の場合、 Complex.One /valueします。Otherwise, it returns the result of the expression Complex.One/value.

適用対象