Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for roundToBigInteger (0.22 sec)

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

          assertEquals(expected.toBigInteger(), DoubleMath.roundToBigInteger(d, UNNECESSARY));
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToBigInteger(double, RoundingMode)
      public void testRoundExactFractionalDoubleToBigIntegerFails() {
        for (double d : FRACTIONAL_DOUBLE_CANDIDATES) {
          assertThrows(ArithmeticException.class, () -> DoubleMath.roundToBigInteger(d, UNNECESSARY));
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        BigInteger maxDoubleAsBigInteger = DoubleMath.roundToBigInteger(Double.MAX_VALUE, UNNECESSARY);
        new RoundToDoubleTester(maxDoubleAsBigInteger)
            .setExpectation(Double.MAX_VALUE, values())
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_maxDoublePlusOne() {
        BigInteger maxDoubleAsBigInteger =
            DoubleMath.roundToBigInteger(Double.MAX_VALUE, UNNECESSARY).add(BigInteger.ONE);
    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

        } while (sqrt1.compareTo(sqrt0) < 0);
        return sqrt0;
      }
    
      @GwtIncompatible // TODO
      private static BigInteger sqrtApproxWithDoubles(BigInteger x) {
        return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN);
      }
    
      /**
       * Returns {@code x}, rounded to a {@code double} with the specified rounding mode. If {@code x}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 18.8K bytes
    - Viewed (0)
Back to top