Math.PowExact 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| PowExact(Int32, Int32) |
將整數基底提升為非負整數冪,並進行溢位檢查。 |
| PowExact(Int64, Int32) |
將整數基底提升為非負整數冪,並進行溢位檢查。 |
PowExact(Int32, Int32)
將整數基底提升為非負整數冪,並進行溢位檢查。
[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
參數
- x
- Int32
整數底數。
- n
- Int32
非負整數指數。
傳回
精確的整數冪次方。
- 屬性
備註
零指數會產生一,包括零基底。 負指數,或 -2147483648 外的結果,2147483647 會導致 ArithmeticException。
適用於
PowExact(Int64, Int32)
將整數基底提升為非負整數冪,並進行溢位檢查。
[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
參數
- x
- Int64
整數底數。
- n
- Int32
非負整數指數。
傳回
精確的整數冪次方。
- 屬性
備註
零指數會產生一,包括零基底。 負指數,或 -9223372036854775808 外的結果,9223372036854775807 會導致 ArithmeticException。