- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 18 for BigDecimal (0.1 seconds)
-
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
public void testRoundToDouble_maxDouble() { BigDecimal maxDoubleAsBigDecimal = new BigDecimal(Double.MAX_VALUE); new RoundToDoubleTester(maxDoubleAsBigDecimal) .setExpectation(Double.MAX_VALUE, RoundingMode.values()) .test(); } public void testRoundToDouble_maxDoublePlusOne() { BigDecimal maxDoubleAsBigDecimal = new BigDecimal(Double.MAX_VALUE).add(BigDecimal.ONE);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Nov 19 01:35:24 GMT 2025 - 11K bytes - Click Count (0) -
guava/src/com/google/common/math/BigDecimalMath.java
@Override double roundToDoubleArbitrarily(BigDecimal bigDecimal) { return bigDecimal.doubleValue(); } @Override int sign(BigDecimal bigDecimal) { return bigDecimal.signum(); } @Override BigDecimal toX(double d, RoundingMode mode) { return new BigDecimal(d); } @Override BigDecimal minus(BigDecimal a, BigDecimal b) { return a.subtract(b); } }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Jul 17 15:26:41 GMT 2025 - 3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
private static final BigDecimal MAX_INT_AS_BIG_DECIMAL = BigDecimal.valueOf(Integer.MAX_VALUE); private static final BigDecimal MIN_INT_AS_BIG_DECIMAL = BigDecimal.valueOf(Integer.MIN_VALUE); private static final BigDecimal MAX_LONG_AS_BIG_DECIMAL = BigDecimal.valueOf(Long.MAX_VALUE); private static final BigDecimal MIN_LONG_AS_BIG_DECIMAL = BigDecimal.valueOf(Long.MIN_VALUE);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 27.3K bytes - Click Count (0) -
android/guava/src/com/google/common/math/BigDecimalMath.java
@Override double roundToDoubleArbitrarily(BigDecimal bigDecimal) { return bigDecimal.doubleValue(); } @Override int sign(BigDecimal bigDecimal) { return bigDecimal.signum(); } @Override BigDecimal toX(double d, RoundingMode mode) { return new BigDecimal(d); } @Override BigDecimal minus(BigDecimal a, BigDecimal b) { return a.subtract(b); } }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Jul 17 15:26:41 GMT 2025 - 3K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
private static final BigDecimal MAX_INT_AS_BIG_DECIMAL = BigDecimal.valueOf(Integer.MAX_VALUE); private static final BigDecimal MIN_INT_AS_BIG_DECIMAL = BigDecimal.valueOf(Integer.MIN_VALUE); private static final BigDecimal MAX_LONG_AS_BIG_DECIMAL = BigDecimal.valueOf(Long.MAX_VALUE); private static final BigDecimal MIN_LONG_AS_BIG_DECIMAL = BigDecimal.valueOf(Long.MIN_VALUE);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 27.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
*/ private static int computeMeanSafely(int x, int y) { BigInteger bigX = BigInteger.valueOf(x); BigInteger bigY = BigInteger.valueOf(y); BigDecimal two = BigDecimal.valueOf(2); // Android doesn't have BigDecimal.TWO yet BigDecimal bigMean = new BigDecimal(bigX.add(bigY)).divide(two, RoundingMode.FLOOR); return bigMean.intValueExact(); } private static boolean fitsInInt(BigInteger big) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 24.1K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
.put(Number.class, 0) .put(UnsignedInteger.class, UnsignedInteger.ZERO) .put(UnsignedLong.class, UnsignedLong.ZERO) .put(BigInteger.class, BigInteger.ZERO) .put(BigDecimal.class, BigDecimal.ZERO) .put(CharSequence.class, "") .put(String.class, "") .put(Pattern.class, Pattern.compile("")) .put(MatchResult.class, createMatchResult())
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 20.9K bytes - Click Count (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/source/TypeNameResolverTest.groovy
typeNameResolver.resolve('File', classMetaData) == 'java.io.File' typeNameResolver.resolve('Closure', classMetaData) == 'groovy.lang.Closure' typeNameResolver.resolve('BigDecimal', classMetaData) == 'java.math.BigDecimal' typeNameResolver.resolve('BigInteger', classMetaData) == 'java.math.BigInteger' } def resolvesUnqualifiedNameToImportedJavaPackage() { when:
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 6K bytes - Click Count (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* is not an integer multiple of {@code b} */ @GwtIncompatible // TODO 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}Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 18.8K bytes - Click Count (0) -
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)); } } } }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Nov 19 01:35:24 GMT 2025 - 27.1K bytes - Click Count (0)