Decimal Math.Pow(Decimal, Int 32) Method
Returns a number raised to an integer power.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
The real number raised to the specified exponent.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static decimal Pow(
decimal value,
int exponent
)
Parameters
Return Value
DecimalThe real number raised to the specified exponent.
Remarks
Raising a number to an integer power is orders of magnitude faster than raising a number to a real power. If you know the exponent is an integer, use this method instead of the Pow(Double, Double) method of Math.
Exceptions
Divide | value is zero and exponent is less than zero. |
Overflow | The result is too large to be represented by a decimal value. |