Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for roundToDouble (0.06 sec)

  1. guava-tests/test/com/google/common/math/LongMathTest.java

        for (RoundingMode roundingMode : EnumSet.complementOf(EnumSet.of(UNNECESSARY))) {
          for (long candidate : roundToDoubleTestCandidates) {
            assertThat(LongMath.roundToDouble(candidate, roundingMode))
                .isEqualTo(BigIntegerMath.roundToDouble(BigInteger.valueOf(candidate), roundingMode));
          }
        }
      }
    
      @GwtIncompatible
      public void testRoundToDoubleAgainstBigIntegerUnnecessary() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            RoundingMode mode = entry.getKey();
            Double expectation = entry.getValue();
            assertWithMessage("roundToDouble(" + input + ", " + mode + ")")
                .that(BigIntegerMath.roundToDouble(input, mode))
                .isEqualTo(expectation);
          }
    
          if (!expectedValues.containsKey(UNNECESSARY)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/BigIntegerMath.java

       *     is not precisely representable as a {@code double}
       * @since 30.0
       */
      @GwtIncompatible
      public static double roundToDouble(BigInteger x, RoundingMode mode) {
        return BigIntegerToDoubleRounder.INSTANCE.roundToDouble(x, mode);
      }
    
      @GwtIncompatible
      private static final class BigIntegerToDoubleRounder extends ToDoubleRounder<BigInteger> {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/LongMath.java

       *     is not precisely representable as a {@code double}
       * @since 30.0
       */
      @GwtIncompatible
      public static double roundToDouble(long x, RoundingMode mode) {
        // Logic adapted from ToDoubleRounder.
        double roundArbitrarily = (double) x;
        long roundArbitrarilyAsLong = (long) roundArbitrarily;
        int cmpXToRoundArbitrarily;
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
Back to top