- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for toBigIntegerExact (2.35 sec)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
for (BigInteger q : NONZERO_BIGINTEGER_CANDIDATES) { for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { BigInteger expected = new BigDecimal(p).divide(new BigDecimal(q), 0, mode).toBigIntegerExact(); assertEquals(expected, BigIntegerMath.divide(p, q, mode)); } } } } private static final BigInteger BAD_FOR_ANDROID_P = new BigInteger("-9223372036854775808");
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode) { BigDecimal pDec = new BigDecimal(p); BigDecimal qDec = new BigDecimal(q); return pDec.divide(qDec, 0, mode).toBigIntegerExact(); } /** * Returns {@code n!}, that is, the product of the first {@code n} positive integers, or {@code 1} * if {@code n == 0}. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K bytes - Viewed (0)