Home
last modified time | relevance | path

Searched refs:gcd (Results 1 – 8 of 8) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java202 assertEquals(arg1.gcd(arg2), result); in try_gcd_variants()
203 assertEquals(arg2.gcd(arg1), result); in try_gcd_variants()
204 assertEquals(arg1.negate().gcd(arg2), result); in try_gcd_variants()
205 assertEquals(arg2.gcd(arg1.negate()), result); in try_gcd_variants()
206 assertEquals(arg1.gcd(arg2.negate()), result); in try_gcd_variants()
207 assertEquals(arg2.negate().gcd(arg1), result); in try_gcd_variants()
208 assertEquals(arg1.negate().gcd(arg2.negate()), result); in try_gcd_variants()
209 assertEquals(arg2.negate().gcd(arg1.negate()), result); in try_gcd_variants()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerModPowTest.java250 BigInteger result = aNumber.gcd(bNumber); in testGcdSecondZero()
270 BigInteger result = aNumber.gcd(bNumber); in testGcdFirstZero()
288 BigInteger result = aNumber.gcd(bNumber); in testGcdFirstZERO()
304 BigInteger result = aNumber.gcd(bNumber); in testGcdBothZeros()
323 BigInteger result = aNumber.gcd(bNumber); in testGcdFirstLonger()
343 BigInteger result = aNumber.gcd(bNumber); in testGcdSecondLonger()
DBigIntegerHashCodeTest.java45 aNumber1.gcd(aNumber2).pow(7); in testSameObject()
DBigIntegerTest.java387 + mod, !one.equals(a.gcd(mod))); in test_modInverseLjava_math_BigInteger()
408 + mod, !one.equals(a.gcd(mod))); in test_modInverseLjava_math_BigInteger()
/libcore/benchmarks/src/benchmarks/regression/
DBigIntegerBenchmark.java37 x.gcd(y); in timeRandomGcd()
/libcore/luni/src/main/java/java/math/
DBigInteger.java887 @NonNull public BigInteger gcd(@NonNull BigInteger value) { in gcd() method in BigInteger
900 return value.gcd(this.mod(value.abs())); in gcd()
905 return this.gcd(value.mod(this.abs())); in gcd()
908 return new BigInteger(BigInt.gcd(getBigInt(), value.getBigInt())); in gcd()
DBigDecimal.java1205 BigInteger gcd; // greatest common divisor between 'p' and 'q' in divide() local
1221 gcd = p.gcd(q); in divide()
1222 p = p.divide(gcd); in divide()
1223 q = q.divide(gcd); in divide()
DBigInt.java269 static BigInt gcd(BigInt a, BigInt b) { in gcd() method in BigInt