Home
last modified time | relevance | path

Searched refs:mod (Results 1 – 7 of 7) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java368 BigInteger a = zero, mod, inv; in test_modInverseLjava_math_BigInteger() local
370 mod = BigInteger.valueOf(j); in test_modInverseLjava_math_BigInteger()
374 inv = a.modInverse(mod); in test_modInverseLjava_math_BigInteger()
375 assertTrue("bad inverse: " + a + " inv mod " + mod in test_modInverseLjava_math_BigInteger()
376 + " equals " + inv, one.equals(a.multiply(inv).mod( in test_modInverseLjava_math_BigInteger()
377 mod))); in test_modInverseLjava_math_BigInteger()
379 + " inv mod " + mod + " equals " + inv, inv in test_modInverseLjava_math_BigInteger()
380 .compareTo(mod) < 0); in test_modInverseLjava_math_BigInteger()
382 + mod + " equals " + inv, inv in test_modInverseLjava_math_BigInteger()
386 + mod, !one.equals(a.gcd(mod))); in test_modInverseLjava_math_BigInteger()
[all …]
DBigIntegerModPowTest.java107 …BigInteger[] mod = new BigInteger[] {new BigInteger("2"), new BigInteger("10"), new BigInteger("21… in testModPowZeroExp() local
110 for (int j = 0; j < mod.length; ++j) { in testModPowZeroExp()
111 assertEquals(base[i] + " modePow(" + exp + ", " + mod[j] in testModPowZeroExp()
113 base[i].modPow(exp, mod[j])); in testModPowZeroExp()
117 mod = new BigInteger[] {new BigInteger("1")}; in testModPowZeroExp()
119 for (int j = 0; j < mod.length; ++j) { in testModPowZeroExp()
120 assertEquals(base[i] + " modePow(" + exp + ", " + mod[j] in testModPowZeroExp()
122 base[i].modPow(exp, mod[j])); in testModPowZeroExp()
DBigIntegerDivideTest.java621 aNumber.mod(bNumber); in testCase22()
638 BigInteger result = aNumber.mod(bNumber); in testCase23()
658 BigInteger result = aNumber.mod(bNumber); in testCase24()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DConstructorTest.java221 int mod = 0; in test_getModifiers() local
225 mod = ctor.getModifiers(); in test_getModifiers()
227 ((mod & Modifier.PUBLIC) == Modifier.PUBLIC) in test_getModifiers()
228 && ((mod & Modifier.PRIVATE) == 0)); in test_getModifiers()
236 mod = ctor.getModifiers(); in test_getModifiers()
238 ((mod & Modifier.PRIVATE) == Modifier.PRIVATE) in test_getModifiers()
239 && ((mod & Modifier.PUBLIC) == 0)); in test_getModifiers()
247 mod = ctor.getModifiers(); in test_getModifiers()
249 ((mod & Modifier.PROTECTED) == Modifier.PROTECTED) in test_getModifiers()
250 && ((mod & Modifier.PUBLIC) == 0)); in test_getModifiers()
DFieldTest.java965 int mod = f.getModifiers(); in test_getModifiers() local
970 ((mod & mask) == mask) && ((mod & nmask) == 0)); in test_getModifiers()
/libcore/luni/src/main/java/java/util/
DGregorianCalendar.java1113 private int mod(int value, int mod) { in mod() method in GregorianCalendar
1114 int rem = value % mod; in mod()
1116 return rem + mod; in mod()
1153 int days, day, mod, maxWeeks, newWeek; in roll() local
1162 mod = mod7(fields[DAY_OF_WEEK] - fields[day] in roll()
1164 maxWeeks = (days - 1 + mod) / 7 + 1; in roll()
1165 newWeek = mod(fields[field] - 1 + value, maxWeeks) + 1; in roll()
1174 int week = (fields[day] - ((fields[day] - 1) / 7 * 7) - 1 + mod) / 7 + 1; in roll()
1187 mod = mod7(fields[DAY_OF_WEEK] - fields[day] in roll()
1189 maxWeeks = (days - 1 + mod) / 7 + 1; in roll()
[all …]
/libcore/luni/src/main/java/java/math/
DBigInteger.java994 return ONE.mod(modulus); in modPow()
1012 public BigInteger mod(BigInteger m) {