Home
last modified time | relevance | path

Searched refs:shiftLeft (Results 1 – 22 of 22) sorted by relevance

/libcore/ojluni/src/test/java/math/BigInteger/
DLargeValueExceptions.java72 BigInteger x = ONE.shiftLeft(16*MAX_INTS - 1).subtract(ONE); in squareNoOverflow()
79 BigInteger x = ONE.shiftLeft(16*MAX_INTS - 1); in squareIndefiniteOverflowSuccess()
86 BigInteger x = ONE.shiftLeft(16*MAX_INTS).subtract(ONE); in squareIndefiniteOverflowFailure()
96 BigInteger x = ONE.shiftLeft(16*MAX_INTS); in squareDefiniteOverflow()
107 BigInteger x = ONE.shiftLeft(halfMaxBits).subtract(ONE); in multiplyNoOverflow()
108 BigInteger y = ONE.shiftLeft(halfMaxBits - 1).subtract(ONE); in multiplyNoOverflow()
115 BigInteger x = ONE.shiftLeft((int)(MAX_BITS/2) - 1); in multiplyIndefiniteOverflowSuccess()
118 BigInteger y = ONE.shiftLeft((int)(MAX_BITS/2) - 1); in multiplyIndefiniteOverflowSuccess()
131 BigInteger x = ONE.shiftLeft((int)(MAX_BITS/2)).subtract(ONE); in multiplyIndefiniteOverflowFailure()
134 BigInteger y = ONE.shiftLeft((int)(MAX_BITS/2)).subtract(ONE); in multiplyIndefiniteOverflowFailure()
[all …]
DBitLengthOverflow.java54 BigInteger x = BigInteger.ONE.shiftLeft(Integer.MAX_VALUE); in main()
62 BigInteger a = BigInteger.ONE.shiftLeft(1073742825); in main()
63 BigInteger b = BigInteger.ONE.shiftLeft(1073742825); in main()
DBigIntegerTest.java299 BigInteger p2 = BigInteger.ONE.shiftLeft(i); in squareRoot()
408 BigInteger base = BigInteger.ONE.shiftLeft(BITS_KARATSUBA - 32 - 1); in multiplyLarge()
413 BigInteger w = u.shiftLeft(a); in multiplyLarge()
418 BigInteger z = v.shiftLeft(b); in multiplyLarge()
420 BigInteger multiplyResult = u.multiply(v).shiftLeft(a + b); in multiplyLarge()
426 base = base.shiftLeft(BITS_TOOM_COOK - BITS_KARATSUBA); in multiplyLarge()
430 BigInteger u2 = u.shiftLeft(1); in multiplyLarge()
433 BigInteger v2 = v.shiftLeft(1); in multiplyLarge()
435 BigInteger multiplyResult = u.multiply(v).shiftLeft(2); in multiplyLarge()
451 BigInteger base = BigInteger.ONE.shiftLeft(BITS_KARATSUBA_SQUARE - 32 - 1); in squareLarge()
[all …]
DCompareToTests.java44 final BigInteger TWO_POW_126 = ONE.shiftLeft(126); in compareToTests()
45 final BigInteger TWO_POW_127 = ONE.shiftLeft(127); in compareToTests()
46 final BigInteger TWO_POW_128 = ONE.shiftLeft(128); in compareToTests()
DDoubleValueOverflow.java38 … BigInteger x = BigInteger.valueOf(2).shiftLeft(Integer.MAX_VALUE); // x = pow(2,pow(2,31)) in main()
DPrimitiveConversionTests.java56 BigInteger x = ONE.shiftLeft(exponent);
DPrimeTest.java186 BigInteger mp = BigInteger.ONE.shiftLeft(n).subtract(BigInteger.ONE); in checkMersennePrimes()
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java222 BigInteger large = three.shiftLeft(500); in test_gcd()
242 BigInteger.ONE.shiftLeft(1000).byteValueExact(); in test_byteValueExact()
246 BigInteger.ONE.negate().shiftLeft(1000).byteValueExact(); in test_byteValueExact()
263 BigInteger.ONE.shiftLeft(1000).shortValueExact(); in test_shortValueExact()
267 BigInteger.ONE.negate().shiftLeft(1000).shortValueExact(); in test_shortValueExact()
284 BigInteger.ONE.shiftLeft(1000).intValueExact(); in test_intValueExact()
288 BigInteger.ONE.negate().shiftLeft(1000).intValueExact(); in test_intValueExact()
297 BigInteger big = BigInteger.valueOf(i).shiftLeft(61); in test_longValueExact()
308 BigInteger.ONE.shiftLeft(1000).longValueExact(); in test_longValueExact()
312 BigInteger.ONE.negate().shiftLeft(1000).longValueExact(); in test_longValueExact()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java445 a = a.shiftLeft(1); in test_shiftRightI()
470 assertTrue("1 << 0", one.shiftLeft(0).equals(one)); in test_shiftLeftI()
471 assertTrue("1 << 1", one.shiftLeft(1).equals(two)); in test_shiftLeftI()
472 assertTrue("1 << 63", one.shiftLeft(63).equals( in test_shiftLeftI()
474 assertTrue("1 << 64", one.shiftLeft(64).equals( in test_shiftLeftI()
476 assertTrue("1 << 65", one.shiftLeft(65).equals( in test_shiftLeftI()
478 assertTrue("-1 << 0", minusOne.shiftLeft(0).equals(minusOne)); in test_shiftLeftI()
479 assertTrue("-1 << 1", minusOne.shiftLeft(1).equals(minusTwo)); in test_shiftLeftI()
480 assertTrue("-1 << 63", minusOne.shiftLeft(63).equals( in test_shiftLeftI()
482 assertTrue("-1 << 64", minusOne.shiftLeft(64).equals( in test_shiftLeftI()
[all …]
DBigIntegerHashCodeTest.java41 aNumber1.add(aNumber2).shiftLeft(125); in testSameObject()
DBigIntegerOperateBitsTest.java1044 BigInteger result = aNumber.shiftLeft(number); in testShiftLeft1()
1062 BigInteger result = aNumber.shiftLeft(number); in testShiftLeft2()
1080 BigInteger result = aNumber.shiftLeft(number); in testShiftLeft3()
1098 BigInteger result = aNumber.shiftLeft(number); in testShiftLeft4()
1116 BigInteger result = aNumber.shiftLeft(number); in testShiftLeft5()
DBigIntegerOrTest.java414 BigInteger r1 = x.and((BigInteger.ZERO.not()).shiftLeft(32)); in testRegression()
415 BigInteger r3 = x.and((BigInteger.ZERO.not().shiftLeft(32) ).not()); in testRegression()
/libcore/benchmarks/src/benchmarks/
DBigIntegerBenchmark.java54 BigInteger big = BigInteger.TEN.pow(prec).shiftLeft(30).add(BigInteger.ONE); in inner()
112 BigInteger newRes = refRes.shiftLeft(30).add(BigInteger.valueOf(i)).shiftRight(30); in repeatToString()
196 BigInteger arg = BigInteger.ONE.shiftLeft(len / 4); in repeatModInverse()
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java1708 return new BigInteger(shiftLeft(x,Integer.numberOfTrailingZeros(y)), sign); in multiplyByInt()
2285 …return xhs.shiftLeft(half*32).add(xl.add(xh).square().subtract(xhs.add(xls))).shiftLeft(half*32).a… in squareKaratsuba()
2318 v2 = da1.add(a2).shiftLeft(1).subtract(a0).square(true); in squareToomCook3()
2331 t2 = t2.subtract(vinf.shiftLeft(1)); in squareToomCook3()
2337 …return vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v… in squareToomCook3()
2562 return NEGATIVE_ONE.shiftLeft(bitsToShift); in pow()
2564 return ONE.shiftLeft(bitsToShift); in pow()
2609 return valueOf(result*newSign).shiftLeft(bitsToShift); in pow()
2638 answer = answer.shiftLeft(bitsToShift); in pow()
2929 BigInteger m2 = ONE.shiftLeft(p); // 2**p in modPow()
[all …]
/libcore/luni/src/test/java/libcore/java/util/random/
DRandomGeneratorFactoryTest.java68 BigInteger.ONE.shiftLeft(256).subtract(BigInteger.ONE).shiftLeft(64); in createsL64X256MixRandomInstance()
/libcore/luni/src/test/java/libcore/java/lang/
DLongTest.java186 BigInteger.valueOf(2).shiftLeft(63).subtract(BigInteger.ONE)
263 BigInteger b = (BigInteger.valueOf(Integer.toUnsignedLong(upper))).shiftLeft(32).
/libcore/ojluni/src/main/java/java/util/random/
DRandomGeneratorFactory.java495 return BigInteger.ONE.shiftLeft(i).subtract(BigInteger.valueOf(j)).shiftLeft(k);
/libcore/ojluni/src/test/java/lang/Long/
DUnsigned.java159 (BigInteger.valueOf(Integer.toUnsignedLong(upper))).shiftLeft(32). in toUnsignedBigInt()
320 BigInteger.ONE.shiftLeft(64).subtract(BigInteger.ONE); in testParseUnsignedLong()
/libcore/ojluni/annotations/sdk/nullability/java/math/
DBigInteger.annotated.java95 … @libcore.util.NonNull public BigInteger shiftLeft(int n) { throw new RuntimeException("Stub!"); } in shiftLeft() method in BigInteger
/libcore/ojluni/src/main/java/java/lang/
DLong.java266 return (BigInteger.valueOf(Integer.toUnsignedLong(upper))).shiftLeft(32). in toUnsignedBigInteger()
/libcore/ojluni/src/main/java/jdk/internal/math/
DFDBigInteger.java1495 return new BigInteger(magnitude).shiftLeft(offset * 32); in toBigInteger()
/libcore/api/
Dcurrent.txt5369 method @NonNull public java.math.BigInteger shiftLeft(int);