Export (0) Print
Expand All

BigInteger.Pow Method

Raises a BigInteger value to the power of a specified value.

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

public static BigInteger Pow(
	BigInteger value,
	int exponent
)

Parameters

value
Type: System.Numerics.BigInteger
The number to raise to the exponent power.
exponent
Type: System.Int32
The exponent to raise value by.

Return Value

Type: System.Numerics.BigInteger
The result of raising value to the exponent power.

ExceptionCondition
ArgumentOutOfRangeException

The value of the exponent parameter is negative.

The Pow method returns 1 if the value of the exponent parameter is 0, or if the values of both the value and exponent parameters are 0. If exponent is 1, the Pow method returns value. If value is negative, the method returns a negative result.

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

The following example illustrates exponentiation using a BigInteger value and an exponent whose value ranges from 0 to 10.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft