Home
last modified time | relevance | path

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

12

/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/util/
DMath.java4 public static long gcd(long a, long b) { in gcd() method in Math
13 public static int gcd(int a, int b) { in gcd() method in Math
23 return a * (b / gcd(a, b)); in lcm()
27 return a * (b / gcd(a, b)); in lcm()
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DIntMathTest.java196 assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(IntMath.gcd(a, b))); in testGCD()
203 assertEquals(a, IntMath.gcd(a, 0)); in testGCDZero()
204 assertEquals(a, IntMath.gcd(0, a)); in testGCDZero()
206 assertEquals(0, IntMath.gcd(0, 0)); in testGCDZero()
212 IntMath.gcd(a, 3); in testGCDNegativePositiveThrows()
216 IntMath.gcd(3, a); in testGCDNegativePositiveThrows()
225 IntMath.gcd(a, 0); in testGCDNegativeZeroThrows()
229 IntMath.gcd(0, a); in testGCDNegativeZeroThrows()
DLongMathTest.java114 assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b))); in testGCDExhaustive()
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
DFraction.java270 final int d = MathUtils.gcd(num, den); in Fraction()
489 int d1 = MathUtils.gcd(denominator, fraction.denominator); in addSub()
510 int d2 = (tmodd1==0)?d1:MathUtils.gcd(tmodd1, d1); in addSub()
542 int d1 = MathUtils.gcd(numerator, fraction.denominator); in multiply()
543 int d2 = MathUtils.gcd(fraction.numerator, denominator); in multiply()
622 int gcd = MathUtils.gcd(numerator, denominator); in getReducedFraction() local
623 numerator /= gcd; in getReducedFraction()
624 denominator /= gcd; in getReducedFraction()
DBigFraction.java131 final BigInteger gcd = num.gcd(den); in BigFraction() local
132 if (BigInteger.ONE.compareTo(gcd) < 0) { in BigFraction()
133 num = num.divide(gcd); in BigFraction()
134 den = den.divide(gcd); in BigFraction()
1021 final BigInteger gcd = numerator.gcd(denominator); in reduce() local
1022 return new BigFraction(numerator.divide(gcd), denominator.divide(gcd)); in reduce()
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/authoring/
DMovie.java79 timescale = gcd(track.getTrackMetaData().getTimescale(), timescale);
84 public static long gcd(long a, long b) {
88 return gcd(b, a % b);
/external/guava/guava-tests/test/com/google/common/math/
DIntMathTest.java363 assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(IntMath.gcd(a, b))); in testGCD()
370 assertEquals(a, IntMath.gcd(a, 0)); in testGCDZero()
371 assertEquals(a, IntMath.gcd(0, a)); in testGCDZero()
373 assertEquals(0, IntMath.gcd(0, 0)); in testGCDZero()
379 IntMath.gcd(a, 3); in testGCDNegativePositiveThrows()
383 IntMath.gcd(3, a); in testGCDNegativePositiveThrows()
392 IntMath.gcd(a, 0); in testGCDNegativeZeroThrows()
396 IntMath.gcd(0, a); in testGCDNegativeZeroThrows()
DLongMathTest.java433 assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b))); in testGCDExhaustive()
441 assertEquals(a, LongMath.gcd(a, 0)); in testGCDZero()
442 assertEquals(a, LongMath.gcd(0, a)); in testGCDZero()
444 assertEquals(0, LongMath.gcd(0, 0)); in testGCDZero()
451 LongMath.gcd(a, 3); in testGCDNegativePositiveThrows()
455 LongMath.gcd(3, a); in testGCDNegativePositiveThrows()
465 LongMath.gcd(a, 0); in testGCDNegativeZeroThrows()
469 LongMath.gcd(0, a); in testGCDNegativeZeroThrows()
/external/llvm/test/CodeGen/X86/
D2011-01-24-DbgValue-Before-Use.ll23 define i64 @gcd(i64 %a, i64 %b) nounwind readnone optsize noinline ssp {
57 %call6 = tail call i64 @gcd(i64 %conv, i64 %conv5) optsize, !dbg !26
81gcd", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOpt…
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java107 lcm = phi.divide(pSub1.gcd(qSub1)); in generateKeyPair()
167 if (!e.gcd(p.subtract(ONE)).equals(ONE)) in chooseRandomPrime()
/external/mesa3d/src/getopt/
Dgetopt_long.c81 static int gcd(int, int);
102 gcd(int a, int b) in gcd() function
133 ncycle = gcd(nnonopts, nopts); in permute_args()
/external/openssh/openbsd-compat/
Dgetopt_long.c98 static int gcd(int, int);
119 gcd(int a, int b) in gcd() function
150 ncycle = gcd(nnonopts, nopts); in permute_args()
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/
DLongMath.java126 public static long gcd(long a, long b) { in gcd() method in LongMath
270 long commonDivisor = gcd(x, denominator); in multiplyFraction()
/external/boringssl/src/crypto/rsa/
Drsa.c502 BIGNUM n, pm1, qm1, lcm, gcd, de, dmp1, dmq1, iqmp; in RSA_check_key() local
537 BN_init(&gcd); in RSA_check_key()
549 !BN_gcd(&gcd, &pm1, &qm1, ctx) || in RSA_check_key()
550 !BN_div(&lcm, NULL, &lcm, &gcd, ctx) || in RSA_check_key()
600 BN_free(&gcd); in RSA_check_key()
/external/libavc/encoder/
Dih264e_time_stamp.c116 static WORD32 gcd(WORD32 i4_x, WORD32 i4_y) in gcd() function
280 WORD32 i4_gcd = gcd(u4_src_frm_rate, u4_tgt_frm_rate); in ih264e_init_frame_time()
/external/clang/test/CXX/drs/
Ddr3xx.cpp1040 friend number gcd(number &x, number &y) {}
1045 a = gcd(a, b);
1046 b = gcd(3, 4); // expected-error {{undeclared}}
1054 friend number gcd(number x, number y) { return 0; }
1059 a = gcd(a, b);
1060 b = gcd(3, 4); // expected-error {{undeclared}}
/external/guava/guava-tests/benchmark/com/google/common/math/
DApacheBenchmark.java49 return IntMath.gcd(a, b); in gcdInt()
54 return LongMath.gcd(a, b); in gcdLong()
DIntMathBenchmark.java77 tmp += IntMath.gcd(nonnegative[j], positive[j]); in gCD()
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/
DMathUtils.java233 final long d = gcd(i, j); in binomialCoefficient()
243 final long d = gcd(i, j); in binomialCoefficient()
897 public static int gcd(final int p, final int q) {
986 public static long gcd(final long p, final long q) {
1165 int lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
1200 long lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
/external/llvm/lib/CodeGen/
DTargetSchedule.cpp38 static unsigned gcd(unsigned Dividend, unsigned Divisor) { in gcd() function
48 unsigned LCM = (uint64_t(A) * B) / gcd(A, B); in lcm()
/external/boringssl/src/crypto/bn/
DCMakeLists.txt48 gcd.c
/external/guava/guava-gwt/src-super/com/google/common/io/super/com/google/common/io/
DBaseEncoding.java413 int gcd = Math.min(8, Integer.lowestOneBit(bitsPerChar)); in Alphabet() local
414 this.charsPerChunk = 8 / gcd; in Alphabet()
415 this.bytesPerChunk = bitsPerChar / gcd; in Alphabet()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNFRuleSet.java670 long gcd = x1 << p2; in lcm() local
673 return x / gcd * y; in lcm()
/external/guava/guava/src/com/google/common/io/
DBaseEncoding.java510 int gcd = Math.min(8, Integer.lowestOneBit(bitsPerChar));
511 this.charsPerChunk = 8 / gcd;
512 this.bytesPerChunk = bitsPerChar / gcd;
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/
DMultiplyTimeScaleTrack.java29 import static com.googlecode.mp4parser.util.Math.gcd;

12