Elementary.Pow Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Pow(Double, Int32) Returns a number raised to an integer power.
Pow(Single, Int32) Returns a number raised to an integer power.

Elementary.Pow(Double, Int32)

Returns a number raised to an integer power.
C#
public static double Pow(
	double x,
	int n
)

Parameters

x  Double
A real number.
n  Int32
An integer exponent.

Return Value

Double
The 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.

Elementary.Pow(Single, Int32)

Returns a number raised to an integer power.
C#
public static float Pow(
	float x,
	int n
)

Parameters

x  Single
A real number.
n  Int32
An integer exponent.

Return Value

Single
The 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.

See Also