C# Complex Pow(Complex, Double)

Description

Complex Pow(Complex, Double) Returns a specified complex number raised to a power specified by a double-precision floating-point number.

Syntax

Complex.Pow(Complex, Double) has the following syntax.


public static Complex Pow(
  Complex value,
  double power
)

Parameters

Complex.Pow(Complex, Double) has the following parameters.

  • value - A complex number to be raised to a power.
  • power - A double-precision floating-point number that specifies a power.

Returns

Complex.Pow(Complex, Double) method returns The complex number value raised to the power power.

Example


using System;//  w w w . j  av a  2s.  c o m
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex value = new Complex(12, -6);
      for (int power = -1; power <= 20; power++)
         Console.WriteLine("{0} ^ {1,2} = {2:N2}", value, power, 
                           Complex.Pow(value, power));
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex