C# Complex Sqrt

Description

Complex Sqrt Returns the square root of a specified complex number.

Syntax

Complex.Sqrt has the following syntax.


public static Complex Sqrt(
  Complex value
)

Parameters

Complex.Sqrt has the following parameters.

  • value - A complex number.

Returns

Complex.Sqrt method returns The square root of value.

Example

Returns the square root of a specified complex number.


using System;/*from  ww w  .  j a  va 2 s. c  o m*/
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(2.3, 1.4),
                           new Complex(2.3, -1.4) };
      foreach (Complex value in values)
         Console.WriteLine(Complex.Sqrt(value));
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex