BigInteger.isProbablePrime

Returns {@code true} if this BigInteger is probably prime, {@code false} if it's definitely composite. If {@code certainty} is ≤ 0, {@code true} is returned.

@param certainty a measure of the uncertainty that the caller is willing to tolerate: if the call returns {@code true} the probability that this BigInteger is prime exceeds (1 - 1/2<sup>{@code certainty}</sup>). The execution time of this method is proportional to the value of this parameter. @return {@code true} if this BigInteger is probably prime, {@code false} if it's definitely composite.

class BigInteger
bool
isProbablePrime
()

Meta