Language

Math.PowExact Method

Definition

Overloads

Name Description
PowExact(Int32, Int32)

Raises the integer base to a non-negative integer power, with an overflow check.

PowExact(Int64, Int32)

Raises the integer base to a non-negative integer power, with an overflow check.

PowExact(Int32, Int32)

Raises the integer base to a non-negative integer power, with an overflow check.

[Android.Runtime.Register("powExact", "(II)I", "", ApiSince=37)]
public static int PowExact(int x, int n);
[<Android.Runtime.Register("powExact", "(II)I", "", ApiSince=37)>]
static member PowExact : int * int -> int

Parameters

x
Int32

The integer base.

n
Int32

The non-negative integer exponent.

Returns

The exact integer power.

Attributes

Remarks

A zero exponent produces one, including for a zero base. A negative exponent, or a result outside -2147483648 through 2147483647, causes ArithmeticException.

Applies to

PowExact(Int64, Int32)

Raises the integer base to a non-negative integer power, with an overflow check.

[Android.Runtime.Register("powExact", "(JI)J", "", ApiSince=37)]
public static long PowExact(long x, int n);
[<Android.Runtime.Register("powExact", "(JI)J", "", ApiSince=37)>]
static member PowExact : int64 * int -> int64

Parameters

x
Int64

The integer base.

n
Int32

The non-negative integer exponent.

Returns

The exact integer power.

Attributes

Remarks

A zero exponent produces one, including for a zero base. A negative exponent, or a result outside -9223372036854775808 through 9223372036854775807, causes ArithmeticException.

Applies to