- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for denominator (0.21 sec)
-
guava/src/com/google/common/math/LongMath.java
x /= commonDivisor; denominator /= commonDivisor; // We know gcd(x, denominator) = 1, and x * numerator / denominator is exact, // so denominator must be a divisor of numerator. return x * (numerator / denominator); } /* * binomial(biggestBinomials[k], k) fits in a long, but not binomial(biggestBinomials[k] + 1, k). */ static final int[] biggestBinomials = { Integer.MAX_VALUE,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
x /= commonDivisor; denominator /= commonDivisor; // We know gcd(x, denominator) = 1, and x * numerator / denominator is exact, // so denominator must be a divisor of numerator. return x * (numerator / denominator); } /* * binomial(biggestBinomials[k], k) fits in a long, but not binomial(biggestBinomials[k] + 1, k). */ static final int[] biggestBinomials = { Integer.MAX_VALUE,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
cmd/utils_test.go
cases := []struct { numerator, denominator, ceiling int64 }{ {0, 1, 0}, {-1, 2, 0}, {1, 2, 1}, {1, 1, 1}, {3, 2, 2}, {54, 11, 5}, {45, 11, 5}, {-4, 3, -1}, {4, -3, -1}, {-4, -3, 2}, {3, 0, 0}, } for i, testCase := range cases { ceiling := ceilFrac(testCase.numerator, testCase.denominator) if ceiling != testCase.ceiling {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Feb 23 21:28:14 UTC 2024 - 10.2K bytes - Viewed (0) -
cmd/utils.go
} // ceilFrac takes a numerator and denominator representing a fraction // and returns its ceiling. If denominator is 0, it returns 0 instead // of crashing. func ceilFrac(numerator, denominator int64) (ceil int64) { if denominator == 0 { // do nothing on invalid input return } // Make denominator positive if denominator < 0 { numerator = -numerator denominator = -denominator }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 31.9K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLongs.java
* quantities. * * <p><b>Java 8+ users:</b> use {@link Long#divideUnsigned(long, long)} instead. * * @param dividend the dividend (numerator) * @param divisor the divisor (denominator) * @throws ArithmeticException if divisor is 0 */ public static long divide(long dividend, long divisor) { if (divisor < 0) { // i.e., divisor >= 2^63: if (compare(dividend, divisor) < 0) {
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/src/com/google/common/primitives/UnsignedInts.java
* quantities. * * <p><b>Java 8+ users:</b> use {@link Integer#divideUnsigned(int, int)} instead. * * @param dividend the dividend (numerator) * @param divisor the divisor (denominator) * @throws ArithmeticException if divisor is 0 */ public static int divide(int dividend, int divisor) { return (int) (toLong(dividend) / toLong(divisor)); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 21:17:54 UTC 2024 - 13.7K bytes - Viewed (0) -
guava/src/com/google/common/primitives/UnsignedInts.java
* quantities. * * <p><b>Java 8+ users:</b> use {@link Integer#divideUnsigned(int, int)} instead. * * @param dividend the dividend (numerator) * @param divisor the divisor (denominator) * @throws ArithmeticException if divisor is 0 */ public static int divide(int dividend, int divisor) { return (int) (toLong(dividend) / toLong(divisor)); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 21:17:54 UTC 2024 - 13.7K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
// shardSize returns the shard size for a given block size and data blocks. func shardSize(blockSize, dataBlocks int) (sz int) { if dataBlocks == 0 { // do nothing on invalid input return } // Make denominator positive if dataBlocks < 0 { blockSize = -blockSize dataBlocks = -dataBlocks } sz = blockSize / dataBlocks if blockSize > 0 && blockSize%dataBlocks != 0 { sz++ } return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 05 11:57:44 UTC 2024 - 40.3K bytes - Viewed (0) -
LICENSE
make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 33.7K bytes - Viewed (0)