Export (0) Print
Expand All

Complex.Pow Method (Complex, Double)

Returns a specified complex number raised to a power specified by a double-precision floating-point number.

Namespace:  System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

'Declaration
Public Shared Function Pow ( _
	value As Complex, _
	power As Double _
) As Complex

Parameters

value
Type: System.Numerics.Complex
A complex number to be raised to a power.
power
Type: System.Double
A double-precision floating-point number that specifies a power.

Return Value

Type: System.Numerics.Complex
The complex number value raised to the power power.

If value is Complex.Zero, the method returns Complex.Zero. For other values, if power is 0, the method returns Complex.One, and if power is 1, it returns value.

This method corresponds to the Math.Pow method for primitive numeric types.

The following example illustrates exponentiation using a complex number and an exponent whose value ranges from -1 to 10.


Imports System.Numerics

Module Example
   Public Sub Main()
      Dim value As New Complex(12, -6)
      For power As Integer = -1 To 10
         Console.WriteLine("{0} ^ {1,2} = {2:N2}", value, power, 
                           Complex.Pow(value, power))
      Next
   End Sub
End Module
' The example displays the following output:
'    (12, -6) ^ -1 = (0.07, 0.03)
'    (12, -6) ^  0 = (1.00, 0.00)
'    (12, -6) ^  1 = (12.00, -6.00)
'    (12, -6) ^  2 = (108.00, -144.00)
'    (12, -6) ^  3 = (432.00, -2,376.00)
'    (12, -6) ^  4 = (-9,072.00, -31,104.00)
'    (12, -6) ^  5 = (-295,488.00, -318,816.00)
'    (12, -6) ^  6 = (-5,458,752.00, -2,052,864.00)
'    (12, -6) ^  7 = (-77,822,208.00, 8,118,144.00)
'    (12, -6) ^  8 = (-885,157,632.00, 564,350,976.00)
'    (12, -6) ^  9 = (-7,235,785,728.00, 12,083,157,504.00)
'    (12, -6) ^ 10 = (-14,330,483,712.00, 188,412,604,416.00)


.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft