BigInteger.IsProbablePrime(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
如果這個 BigInteger 是質數,true且確定是複合數,則回傳false。
[Android.Runtime.Register("isProbablePrime", "(I)Z", "GetIsProbablePrime_IHandler")]
public virtual bool IsProbablePrime(int certainty);
[<Android.Runtime.Register("isProbablePrime", "(I)Z", "GetIsProbablePrime_IHandler")>]
abstract member IsProbablePrime : int -> bool
override this.IsProbablePrime : int -> bool
參數
- certainty
- Int32
衡量呼叫者願意容忍的不確定性:若呼叫回傳true,該大整數為質數的機率大於 (1 - 1/2<sup>certainty</sup)。> 此方法的執行時間與該參數值成正比。
傳回
true 如果這個 BigInteger 可能是質數,且 false 確定是複合的。
- 屬性
備註
如果這個 BigInteger 是質數,true且確定是複合數,則回傳false。 若 certainty 是 ≤ 0, true 則回傳。
Java 文件 java.math.BigInteger.isProbablePrime(.*int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。