- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 61 for Floor (0.06 sec)
-
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
// Relies on the correctness of sqrt(BigInteger, FLOOR). @GwtIncompatible // TODO public void testSqrtExact() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { BigInteger floor = BigIntegerMath.sqrt(x, FLOOR); // We only expect an exception if x was not a perfect square. boolean isPerfectSquare = floor.pow(2).equals(x); try { assertEquals(floor, BigIntegerMath.sqrt(x, UNNECESSARY));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 17 17:58:33 UTC 2024 - 27.8K bytes - Viewed (0) -
android/guava/src/com/google/common/math/BigIntegerMath.java
return LongMath.log10(x.longValue(), mode); } int approxLog10 = (int) (log2(x, FLOOR) * LN_2 / LN_10); BigInteger approxPow = BigInteger.TEN.pow(approxLog10); int approxCmp = approxPow.compareTo(x); /* * We adjust approxLog10 and approxPow until they're equal to floor(log10(x)) and * 10^floor(log10(x)). */ if (approxCmp > 0) { /*
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 18.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} /* Relies on the correctness of sqrt(int, FLOOR). */ @GwtIncompatible // sqrt public void testSqrtExactMatchesFloorOrThrows() { for (int x : POSITIVE_INTEGER_CANDIDATES) { int floor = IntMath.sqrt(x, FLOOR); // We only expect an exception if x was not a perfect square. boolean isPerfectSquare = (floor * floor == x); try { assertEquals(floor, IntMath.sqrt(x, UNNECESSARY));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 24.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
.roundUnnecessaryShouldThrow() .test(); } public void testRoundToDouble_negativeTwoToThe54MinusThree() { new RoundToDoubleTester(BigDecimal.valueOf((-1L << 54) - 3)) .setExpectation(-Math.pow(2, 54), DOWN, CEILING) .setExpectation( DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP, HALF_DOWN, HALF_UP, HALF_EVEN)
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 10.6K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
return LongMath.log10(x.longValue(), mode); } int approxLog10 = (int) (log2(x, FLOOR) * LN_2 / LN_10); BigInteger approxPow = BigInteger.TEN.pow(approxLog10); int approxCmp = approxPow.compareTo(x); /* * We adjust approxLog10 and approxPow until they're equal to floor(log10(x)) and * 10^floor(log10(x)). */ if (approxCmp > 0) { /*
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 18.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} } } // Relies on the correctness of log10(long, FLOOR) and of pow(long, int). @GwtIncompatible // TODO public void testLog10Exact() { for (long x : POSITIVE_LONG_CANDIDATES) { int floor = LongMath.log10(x, FLOOR); boolean expectedSuccess = LongMath.pow(10, floor) == x; try { assertEquals(floor, LongMath.log10(x, UNNECESSARY)); assertTrue(expectedSuccess);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/LongMathTest.java
} } } // Relies on the correctness of log10(long, FLOOR) and of pow(long, int). @GwtIncompatible // TODO public void testLog10Exact() { for (long x : POSITIVE_LONG_CANDIDATES) { int floor = LongMath.log10(x, FLOOR); boolean expectedSuccess = LongMath.pow(10, floor) == x; try { assertEquals(floor, LongMath.log10(x, UNNECESSARY)); assertTrue(expectedSuccess);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/IntMath.java
* can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6, * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2. */ int y = maxLog10ForLeadingZeros[Integer.numberOfLeadingZeros(x)]; /* * y is the higher of the two possible values of floor(log10(x)). If x < 10^y, then we want the
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
guava/src/com/google/common/math/IntMath.java
* can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6, * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2. */ int y = maxLog10ForLeadingZeros[Integer.numberOfLeadingZeros(x)]; /* * y is the higher of the two possible values of floor(log10(x)). If x < 10^y, then we want the
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
* can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6, * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2. */ int y = maxLog10ForLeadingZeros[Long.numberOfLeadingZeros(x)]; /* * y is the higher of the two possible values of floor(log10(x)). If x < 10^y, then we want the
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 44.6K bytes - Viewed (0)