Home
last modified time | relevance | path

Searched refs:DoubleUtils (Results 1 – 22 of 22) sorted by relevance

/external/guava/android/guava-tests/test/com/google/common/math/
DDoubleUtilsTest.java37 assertEquals(jdkNextDown.invoke(null, d), DoubleUtils.nextDown(d)); in testNextDown()
52 if (b.doubleValue() != DoubleUtils.bigToDouble(b)) { in testBigToDouble()
55 b, b.doubleValue(), DoubleUtils.bigToDouble(b)); in testBigToDouble()
61 assertEquals(0.0, DoubleUtils.ensureNonNegative(0.0)); in testEnsureNonNegative()
63 assertEquals(positiveValue, DoubleUtils.ensureNonNegative(positiveValue)); in testEnsureNonNegative()
64 assertEquals(0.0, DoubleUtils.ensureNonNegative(-positiveValue)); in testEnsureNonNegative()
66 assertEquals(Double.POSITIVE_INFINITY, DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY)); in testEnsureNonNegative()
67 assertEquals(0.0, DoubleUtils.ensureNonNegative(Double.NEGATIVE_INFINITY)); in testEnsureNonNegative()
69 DoubleUtils.ensureNonNegative(Double.NaN); in testEnsureNonNegative()
76 assertEquals(DoubleUtils.ONE_BITS, Double.doubleToRawLongBits(1.0)); in testOneBits()
DBigDecimalMathTest.java220 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 53)), FLOOR, UP, HALF_UP) in testRoundToDouble_minPreciselyRepresentableMinusOne()
228 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP) in testRoundToDouble_negativeTwoToThe54MinusOne()
237 DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_negativeTwoToThe54MinusThree()
DBigIntegerMathTest.java706 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 53)), FLOOR, UP, HALF_UP)
715 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP)
725 DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP, HALF_DOWN, HALF_UP, HALF_EVEN)
/external/guava/guava-tests/test/com/google/common/math/
DDoubleUtilsTest.java37 assertEquals(jdkNextDown.invoke(null, d), DoubleUtils.nextDown(d)); in testNextDown()
52 if (b.doubleValue() != DoubleUtils.bigToDouble(b)) { in testBigToDouble()
55 b, b.doubleValue(), DoubleUtils.bigToDouble(b)); in testBigToDouble()
61 assertEquals(0.0, DoubleUtils.ensureNonNegative(0.0)); in testEnsureNonNegative()
63 assertEquals(positiveValue, DoubleUtils.ensureNonNegative(positiveValue)); in testEnsureNonNegative()
64 assertEquals(0.0, DoubleUtils.ensureNonNegative(-positiveValue)); in testEnsureNonNegative()
66 assertEquals(Double.POSITIVE_INFINITY, DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY)); in testEnsureNonNegative()
67 assertEquals(0.0, DoubleUtils.ensureNonNegative(Double.NEGATIVE_INFINITY)); in testEnsureNonNegative()
69 DoubleUtils.ensureNonNegative(Double.NaN); in testEnsureNonNegative()
76 assertEquals(DoubleUtils.ONE_BITS, Double.doubleToRawLongBits(1.0)); in testOneBits()
DBigDecimalMathTest.java220 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 53)), FLOOR, UP, HALF_UP) in testRoundToDouble_minPreciselyRepresentableMinusOne()
228 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP) in testRoundToDouble_negativeTwoToThe54MinusOne()
237 DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_negativeTwoToThe54MinusThree()
DBigIntegerMathTest.java706 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 53)), FLOOR, UP, HALF_UP)
715 .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP)
725 DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP, HALF_DOWN, HALF_UP, HALF_EVEN)
/external/guava/android/guava/src/com/google/common/math/
DToDoubleRounder.java79 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
86 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
96 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
118 roundFloorAsDouble = DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
DDoubleMath.java18 import static com.google.common.math.DoubleUtils.IMPLICIT_BIT;
19 import static com.google.common.math.DoubleUtils.SIGNIFICAND_BITS;
20 import static com.google.common.math.DoubleUtils.getSignificand;
21 import static com.google.common.math.DoubleUtils.isFinite;
22 import static com.google.common.math.DoubleUtils.isNormal;
23 import static com.google.common.math.DoubleUtils.scaleNormalize;
DDoubleUtils.java36 final class DoubleUtils { class
37 private DoubleUtils() {} in DoubleUtils() method in DoubleUtils
DLongMath.java1275 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1282 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1292 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1311 roundFloorAsDouble = DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1333 return ((DoubleUtils.getSignificand(roundFloorAsDouble) & 1L) == 0) in roundToDouble()
DBigIntegerMath.java288 int shift = (log2 - DoubleUtils.SIGNIFICAND_BITS) & ~1; // even! in sqrtFloor()
308 return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN); in sqrtApproxWithDoubles()
345 return DoubleUtils.bigToDouble(bigInteger); in roundToDoubleArbitrarily()
DLinearTransformation.java18 import static com.google.common.math.DoubleUtils.isFinite;
DStatsAccumulator.java18 import static com.google.common.math.DoubleUtils.ensureNonNegative;
DStats.java20 import static com.google.common.math.DoubleUtils.ensureNonNegative;
/external/guava/guava/src/com/google/common/math/
DToDoubleRounder.java79 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
86 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
96 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
118 roundFloorAsDouble = DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
DDoubleMath.java18 import static com.google.common.math.DoubleUtils.IMPLICIT_BIT;
19 import static com.google.common.math.DoubleUtils.SIGNIFICAND_BITS;
20 import static com.google.common.math.DoubleUtils.getSignificand;
21 import static com.google.common.math.DoubleUtils.isFinite;
22 import static com.google.common.math.DoubleUtils.isNormal;
23 import static com.google.common.math.DoubleUtils.scaleNormalize;
DDoubleUtils.java36 final class DoubleUtils { class
37 private DoubleUtils() {} in DoubleUtils() method in DoubleUtils
DLongMath.java1275 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1282 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1292 : DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1311 roundFloorAsDouble = DoubleUtils.nextDown(roundArbitrarily); in roundToDouble()
1333 return ((DoubleUtils.getSignificand(roundFloorAsDouble) & 1L) == 0) in roundToDouble()
DBigIntegerMath.java288 int shift = (log2 - DoubleUtils.SIGNIFICAND_BITS) & ~1; // even! in sqrtFloor()
308 return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN); in sqrtApproxWithDoubles()
345 return DoubleUtils.bigToDouble(bigInteger); in roundToDoubleArbitrarily()
DLinearTransformation.java18 import static com.google.common.math.DoubleUtils.isFinite;
DStatsAccumulator.java18 import static com.google.common.math.DoubleUtils.ensureNonNegative;
DStats.java20 import static com.google.common.math.DoubleUtils.ensureNonNegative;