Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for fitsInLong (0.07 sec)

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

      public void testConstantsBiggestBinomials() {
        for (int k = 0; k < LongMath.biggestBinomials.length; k++) {
          assertTrue(fitsInLong(BigIntegerMath.binomial(LongMath.biggestBinomials[k], k)));
          assertTrue(
              LongMath.biggestBinomials[k] == Integer.MAX_VALUE
                  || !fitsInLong(BigIntegerMath.binomial(LongMath.biggestBinomials[k] + 1, k)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/math/BigIntegerMath.java

       *     is not a power of ten
       */
      @GwtIncompatible // TODO
      @SuppressWarnings("fallthrough")
      public static int log10(BigInteger x, RoundingMode mode) {
        checkPositive("x", x);
        if (fitsInLong(x)) {
          return LongMath.log10(x.longValue(), mode);
        }
    
        int approxLog10 = (int) (log2(x, FLOOR) * LN_2 / LN_10);
        BigInteger approxPow = BigInteger.TEN.pow(approxLog10);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
Back to top