Elementary.Pow Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Overload List
Pow( | Returns a number raised to an integer power. |
Pow( | Returns a number raised to an integer power. |
Pow<T>(T, Int32) | Returns a number raised to an integer power. |
Pow(Double, Int32)
public static double Pow(
double x,
int n
)
Parameters
Return Value
DoubleThe 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.
Pow<T>(T, Int32)
public static T Pow<T>(
T x,
int n
)
Parameters
- x T
- A real number.
- n Int32
- An integer exponent.
Type Parameters
- T
Return Value
TThe 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.
Pow(Single, Int32)
public static float Pow(
float x,
int n
)
Parameters
Return Value
SingleThe 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.