Searched refs:certainty (Results 1 – 3 of 3) sorted by relevance
/libcore/ojluni/src/main/java/java/math/ |
D | BitSieve.java | 194 BigInteger retrieve(BigInteger initValue, int certainty, java.util.Random random) { in retrieve() argument 203 if (candidate.primeToCertainty(certainty, random)) in retrieve()
|
D | BigInteger.java | 664 public BigInteger(int bitLength, int certainty, @NonNull Random rnd) { in BigInteger() argument 670 ? smallPrime(bitLength, certainty, rnd) in BigInteger() 671 : largePrime(bitLength, certainty, rnd)); in BigInteger() 713 private static BigInteger smallPrime(int bitLength, int certainty, @NonNull Random rnd) { in smallPrime() argument 743 if (p.primeToCertainty(certainty, rnd)) in smallPrime() 757 private static BigInteger largePrime(int bitLength, int certainty, @NonNull Random rnd) { in largePrime() argument 765 BigInteger candidate = searchSieve.retrieve(p, certainty, rnd); in largePrime() 773 candidate = searchSieve.retrieve(p, certainty, rnd); in largePrime() 869 boolean primeToCertainty(int certainty, @NonNull Random random) { in primeToCertainty() argument 871 int n = (Math.min(certainty, Integer.MAX_VALUE-1)+1)/2; in primeToCertainty() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | OldBigIntegerTest.java | 81 int certainty[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, in test_ConstructorIILjava_util_Random() local 84 for (int c = 0; c < certainty.length; c++) { in test_ConstructorIILjava_util_Random()
|