- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for shiftLeft (0.16 sec)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
BigInteger plusHalfSquared = result.pow(2).add(result).shiftLeft(2).add(ONE); BigInteger x4 = x.shiftLeft(2); // sqrt(x) < result + 0.5, so 4 * x < (result + 0.5)^2 * 4 // (result + 0.5)^2 * 4 = (result^2 + result)*4 + 1 assertTrue(x4.compareTo(plusHalfSquared) < 0); BigInteger minusHalfSquared = result.pow(2).subtract(result).shiftLeft(2).add(ONE);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
BigInteger plusHalfSquared = result.pow(2).add(result).shiftLeft(2).add(ONE); BigInteger x4 = x.shiftLeft(2); // sqrt(x) < result + 0.5, so 4 * x < (result + 0.5)^2 * 4 // (result + 0.5)^2 * 4 = (result^2 + result)*4 + 1 assertTrue(x4.compareTo(plusHalfSquared) < 0); BigInteger minusHalfSquared = result.pow(2).subtract(result).shiftLeft(2).add(ONE);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/UnsignedLongTest.java
.add(BigInteger.valueOf(Integer.MAX_VALUE).add(bigI)) .add(BigInteger.valueOf(Integer.MIN_VALUE).add(bigI)) .add(BigInteger.ONE.shiftLeft(63).add(bigI)) .add(BigInteger.ONE.shiftLeft(64).add(bigI)); } TEST_LONGS = testLongsBuilder.build(); TEST_BIG_INTEGERS = testBigIntegersBuilder.build(); } public void testAsUnsignedAndLongValueAreInverses() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 10.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java
.add(BigInteger.valueOf(Integer.MAX_VALUE).add(bigI)) .add(BigInteger.valueOf(Integer.MIN_VALUE).add(bigI)) .add(BigInteger.ONE.shiftLeft(63).add(bigI)) .add(BigInteger.ONE.shiftLeft(64).add(bigI)); } TEST_LONGS = testLongsBuilder.build(); TEST_BIG_INTEGERS = testBigIntegersBuilder.build(); } public void testAsUnsignedAndLongValueAreInverses() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/BigIntegerMath.java
* We have that x / 2^shift < 2^54. Our initial approximation to sqrtFloor(x) will be * 2^(shift/2) * sqrtApproxWithDoubles(x / 2^shift). */ sqrt0 = sqrtApproxWithDoubles(x.shiftRight(shift)).shiftLeft(shift >> 1); } BigInteger sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1); if (sqrt0.equals(sqrt1)) { return sqrt0; } do { sqrt0 = sqrt1;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 18.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
public void testMaxLog10ForLeadingZeros() { for (int i = 0; i < Integer.SIZE; i++) { assertEquals( BigIntegerMath.log10(BigInteger.ONE.shiftLeft(Integer.SIZE - i), FLOOR), IntMath.maxLog10ForLeadingZeros[i]); } } @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath public void testConstantsHalfPowersOf10() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 24.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleMath.java
return BigInteger.valueOf((long) x); } int exponent = getExponent(x); long significand = getSignificand(x); BigInteger result = BigInteger.valueOf(significand).shiftLeft(exponent - SIGNIFICAND_BITS); return (x < 0) ? result.negate() : result; } /** * Returns {@code true} if {@code x} is exactly equal to {@code 2^k} for some finite integer * {@code k}. */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 18.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
public void testMaxLog10ForLeadingZeros() { for (int i = 0; i < Integer.SIZE; i++) { assertEquals( BigIntegerMath.log10(BigInteger.ONE.shiftLeft(Integer.SIZE - i), FLOOR), IntMath.maxLog10ForLeadingZeros[i]); } } @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath public void testConstantsHalfPowersOf10() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 24.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/LongMathTest.java
public void testMaxLog10ForLeadingZeros() { for (int i = 0; i < Long.SIZE; i++) { assertEquals( BigIntegerMath.log10(BigInteger.ONE.shiftLeft(Long.SIZE - i), FLOOR), LongMath.maxLog10ForLeadingZeros[i]); } } @GwtIncompatible // TODO public void testConstantsPowersOf10() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 04 20:15:57 GMT 2024 - 32.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
public void testMaxLog10ForLeadingZeros() { for (int i = 0; i < Long.SIZE; i++) { assertEquals( BigIntegerMath.log10(BigInteger.ONE.shiftLeft(Long.SIZE - i), FLOOR), LongMath.maxLog10ForLeadingZeros[i]); } } @GwtIncompatible // TODO public void testConstantsPowersOf10() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Mar 04 20:15:57 GMT 2024 - 32.5K bytes - Viewed (0)