- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 251 for divide (0.07 sec)
-
src/main/java/org/codelibs/fess/util/MemoryUtil.java
} else if (size.divide(ONE_GB_BI).compareTo(BigInteger.ZERO) > 0) { displaySize = new BigDecimal(size.divide(ONE_MB_BI)).divide(BigDecimal.valueOf(1000)) + "GB"; } else if (size.divide(ONE_MB_BI).compareTo(BigInteger.ZERO) > 0) { displaySize = new BigDecimal(size.divide(ONE_KB_BI)).divide(BigDecimal.valueOf(1000)) + "MB";
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} boolean dividesEvenly = (p % q) == 0; try { assertEquals(p + "/" + q, p, IntMath.divide(p, q, UNNECESSARY) * q); assertTrue(p + "/" + q + " not expected to divide evenly", dividesEvenly); } catch (ArithmeticException e) { assertFalse(p + "/" + q + " expected to divide evenly", dividesEvenly); } } } } public void testZeroDivIsAlwaysZero() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
long expected = new BigDecimal(valueOf(p)).divide(new BigDecimal(valueOf(q)), 0, mode).longValue(); long actual = LongMath.divide(p, q, mode); if (expected != actual) { failFormat("expected divide(%s, %s, %s) = %s; got %s", p, q, mode, expected, actual); } } } } } @GwtIncompatible // TODO
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
new RoundToDoubleTester(BigDecimal.ZERO).setExpectation(0.0, values()).test(); } public void testRoundToDouble_oneThird() { new RoundToDoubleTester( BigDecimal.ONE.divide(BigDecimal.valueOf(3), new MathContext(50, HALF_EVEN))) .roundUnnecessaryShouldThrow() .setExpectation(0.33333333333333337, UP, CEILING)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 10.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
} boolean dividesEvenly = (p % q) == 0; try { assertEquals(p + "/" + q, p, IntMath.divide(p, q, UNNECESSARY) * q); assertTrue(p + "/" + q + " not expected to divide evenly", dividesEvenly); } catch (ArithmeticException e) { assertFalse(p + "/" + q + " expected to divide evenly", dividesEvenly); } } } } public void testZeroDivIsAlwaysZero() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
*/ 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; sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1); } while (sqrt1.compareTo(sqrt0) < 0); return sqrt0; } @GwtIncompatible // TODO
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 18.8K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLongs.java
public static long divide(long dividend, long divisor) { if (divisor < 0) { // i.e., divisor >= 2^63: if (compare(dividend, divisor) < 0) { return 0; // dividend < divisor } else { return 1; // dividend >= divisor } } // Optimization - use signed division if dividend < 2^63 if (dividend >= 0) { return dividend / divisor; } /*
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 12 21:04:48 UTC 2024 - 17.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java
Random r = new Random(0L); for (int i = 0; i < 1000000; i++) { int dividend = r.nextInt(); int divisor = r.nextInt(); // Test that the Euclidean property is preserved: assertThat( dividend - (divisor * UnsignedInts.divide(dividend, divisor) + UnsignedInts.remainder(dividend, divisor))) .isEqualTo(0); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 12.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/QuantilesTest.java
// ceil(199*index/2). if (index % 2 == 0) { int position = IntMath.divide(199 * index, 2, UNNECESSARY); return PSEUDORANDOM_DATASET_SORTED.get(position); } else { int positionFloor = IntMath.divide(199 * index, 2, FLOOR); int positionCeil = IntMath.divide(199 * index, 2, CEILING); double lowerValue = PSEUDORANDOM_DATASET_SORTED.get(positionFloor);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 29.7K bytes - Viewed (0) -
src/cmd/asm/internal/asm/expr_test.go
} } type badExprTest struct { input string error string // Empty means no error. } var badExprTests = []badExprTest{ {"0/0", "division by zero"}, {"3/0", "division by zero"}, {"(1<<63)/0", "divide of value with high bit set"}, {"3%0", "modulo by zero"}, {"(1<<63)%0", "modulo of value with high bit set"}, {"3<<-4", "negative left shift count"}, {"3<<(1<<63)", "negative left shift count"},
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 29 07:48:38 UTC 2023 - 3.2K bytes - Viewed (0)