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

Value が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.

適用対象