Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 83 for divider (0.4 sec)

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

        new RoundToDoubleTester(BigDecimal.ZERO).setExpectation(0.0, values()).test();
      }
    
      public void testRoundToDouble_oneThird() {
        new RoundToDoubleTester(
                BigDecimal.ONE.divide(BigDecimal.valueOf(3), new MathContext(50, HALF_EVEN)))
            .roundUnnecessaryShouldThrow()
            .setExpectation(0.33333333333333337, UP, CEILING)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/IntMathTest.java

            }
            boolean dividesEvenly = (p % q) == 0;
            try {
              assertEquals(p + "/" + q, p, IntMath.divide(p, q, UNNECESSARY) * q);
              assertTrue(p + "/" + q + " not expected to divide evenly", dividesEvenly);
            } catch (ArithmeticException e) {
              assertFalse(p + "/" + q + " expected to divide evenly", dividesEvenly);
            }
          }
        }
      }
    
      public void testZeroDivIsAlwaysZero() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/TablesTransformValuesRowTest.java

      }
    
      @Override
      protected Map<String, Integer> makePopulatedMap() {
        Table<Character, String, Integer> table = HashBasedTable.create();
        table.put('a', "one", 2);
        table.put('a', "two", 4);
        table.put('a', "three", 6);
        table.put('b', "four", 8);
        return Tables.transformValues(table, TableCollectionTest.DIVIDE_BY_2).row('a');
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/BigIntegerMath.java

           */
          sqrt0 = sqrtApproxWithDoubles(x.shiftRight(shift)).shiftLeft(shift >> 1);
        }
        BigInteger sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        if (sqrt0.equals(sqrt1)) {
          return sqrt0;
        }
        do {
          sqrt0 = sqrt1;
          sqrt1 = sqrt0.add(x.divide(sqrt0)).shiftRight(1);
        } while (sqrt1.compareTo(sqrt0) < 0);
        return sqrt0;
      }
    
      @GwtIncompatible // TODO
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/IntMathTest.java

            }
            boolean dividesEvenly = (p % q) == 0;
            try {
              assertEquals(p + "/" + q, p, IntMath.divide(p, q, UNNECESSARY) * q);
              assertTrue(p + "/" + q + " not expected to divide evenly", dividesEvenly);
            } catch (ArithmeticException e) {
              assertFalse(p + "/" + q + " expected to divide evenly", dividesEvenly);
            }
          }
        }
      }
    
      public void testZeroDivIsAlwaysZero() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/StatsTesting.java

          BigInteger.valueOf(Integer.MAX_VALUE)
              .multiply(BigInteger.valueOf(3L))
              .divide(BigInteger.valueOf(4L))
              .doubleValue();
      static final double LARGE_INTEGER_VALUES_POPULATION_VARIANCE =
          BigInteger.valueOf(Integer.MAX_VALUE)
              .multiply(BigInteger.valueOf(Integer.MAX_VALUE))
              .divide(BigInteger.valueOf(16L))
              .doubleValue();
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/Splitter.java

      @GwtIncompatible // java.util.regex
      public static Splitter onPattern(String separatorPattern) {
        return onPatternInternal(Platform.compilePattern(separatorPattern));
      }
    
      /**
       * Returns a splitter that divides strings into pieces of the given length. For example, {@code
       * Splitter.fixedLength(2).split("abcde")} returns an iterable containing {@code ["ab", "cd",
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            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));
            }
          }
        }
      }
    
      private static final BigInteger BAD_FOR_ANDROID_P = new BigInteger("-9223372036854775808");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            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));
            }
          }
        }
      }
    
      private static final BigInteger BAD_FOR_ANDROID_P = new BigInteger("-9223372036854775808");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Iterators.java

       *     partitions
       * @throws IllegalArgumentException if {@code size} is nonpositive
       */
      public static <T extends @Nullable Object> UnmodifiableIterator<List<T>> partition(
          Iterator<T> iterator, int size) {
        return partitionImpl(iterator, size, false);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
Back to top