- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for isPrime (0.06 sec)
-
android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
tmp += LongMath.binomial(binomialArguments[j][0], binomialArguments[j][1]); } return tmp; } @Benchmark int isPrime(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; if (LongMath.isPrime(positive[j])) { tmp++; } } return tmp; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
tester.testAllPublicStaticMethods(LongMath.class); } @GwtIncompatible // isPrime is GWT-incompatible public void testIsPrimeSmall() { // Check the first 1000 integers for (int i = 2; i < 1000; i++) { assertEquals(BigInteger.valueOf(i).isProbablePrime(100), LongMath.isPrime(i)); } } @GwtIncompatible // isPrime is GWT-incompatible public void testIsPrimeManyConstants() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 31.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
tester.testAllPublicStaticMethods(IntMath.class); } @GwtIncompatible // isPrime is GWT-incompatible public void testIsPrime() { // Defer correctness tests to Long.isPrime // Check the first 100,000 integers for (int i = 0; i < 100000; i++) { assertEquals(LongMath.isPrime(i), IntMath.isPrime(i)); } // Then check 1000 deterministic pseudo-random int values.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* <p>To test larger numbers, use {@link BigInteger#isProbablePrime}. * * @throws IllegalArgumentException if {@code n} is negative * @since 20.0 */ @GwtIncompatible // TODO public static boolean isPrime(long n) { if (n < 2) { checkNonNegative("n", n); return false; } if (n < 66) { // Encode all primes less than 66 into mask without 0 and 1. long mask =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0)