Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 986 for Mode (0.13 sec)

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

        BigInteger x = BigInteger.TEN.pow(100);
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(100, BigIntegerMath.log10(x, mode));
        }
      }
    
      @GwtIncompatible // TODO
      public void testSqrtZeroAlwaysZero() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(ZERO, BigIntegerMath.sqrt(ZERO, mode));
        }
      }
    
      @GwtIncompatible // TODO
    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)
  2. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        BigInteger x = BigInteger.TEN.pow(100);
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(100, BigIntegerMath.log10(x, mode));
        }
      }
    
      @GwtIncompatible // TODO
      public void testSqrtZeroAlwaysZero() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(ZERO, BigIntegerMath.sqrt(ZERO, mode));
        }
      }
    
      @GwtIncompatible // TODO
    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)
  3. android/guava/src/com/google/common/math/LongMath.java

        }
        throw new AssertionError();
      }
    
      /**
       * Returns the result of dividing {@code p} by {@code q}, rounding using the specified {@code
       * RoundingMode}.
       *
       * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a}
       *     is not an integer multiple of {@code b}
       */
      @GwtIncompatible // TODO
      @SuppressWarnings("fallthrough")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/DoubleMathTest.java

          for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
            BigDecimal expected = new BigDecimal(d).setScale(0, mode);
            boolean isInBounds =
                expected.compareTo(MAX_INT_AS_BIG_DECIMAL) <= 0
                    & expected.compareTo(MIN_INT_AS_BIG_DECIMAL) >= 0;
    
            try {
              assertEquals(
                  "Rounding " + d + " with mode " + mode,
                  expected.intValue(),
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/IntMathTest.java

        int x = 1000000;
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(6, IntMath.log10(x, mode));
        }
      }
    
      // Simple test to cover sqrt(0) for all types and all modes.
      @GwtIncompatible // sqrt
      public void testSqrtZeroAlwaysZero() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(0, IntMath.sqrt(0, mode));
        }
      }
    
      @GwtIncompatible // sqrt
    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)
  6. android/guava/src/com/google/common/math/BigDecimalMath.java

      /**
       * Returns {@code x}, rounded to a {@code double} with the specified rounding mode. If {@code x}
       * is precisely representable as a {@code double}, its {@code double} value will be returned;
       * otherwise, the rounding will choose between the two nearest representable values with {@code
       * mode}.
       *
       * <p>For the case of {@link RoundingMode#HALF_DOWN}, {@code HALF_UP}, and {@code HALF_EVEN},
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 23 18:45:50 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

          for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
            BigDecimal expected = new BigDecimal(d).setScale(0, mode);
            boolean isInBounds =
                expected.compareTo(MAX_INT_AS_BIG_DECIMAL) <= 0
                    & expected.compareTo(MIN_INT_AS_BIG_DECIMAL) >= 0;
    
            try {
              assertEquals(
                  "Rounding " + d + " with mode " + mode,
                  expected.intValue(),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/ToDoubleRounder.java

      /** Returns d's value as an X, rounded with the specified mode. */
      abstract X toX(double d, RoundingMode mode);
    
      /** Returns a - b, guaranteed that both arguments are nonnegative. */
      abstract X minus(X a, X b);
    
      /** Rounds {@code x} to a {@code double}. */
      final double roundToDouble(X x, RoundingMode mode) {
        checkNotNull(x, "x");
        checkNotNull(mode, "mode");
        double roundArbitrarily = roundToDoubleArbitrarily(x);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/IntMath.java

      /**
       * Returns the result of dividing {@code p} by {@code q}, rounding using the specified {@code
       * RoundingMode}.
       *
       * @throws ArithmeticException if {@code q == 0}, or if {@code mode == UNNECESSARY} and {@code a}
       *     is not an integer multiple of {@code b}
       */
      @SuppressWarnings("fallthrough")
      public static int divide(int p, int q, RoundingMode mode) {
        checkNotNull(mode);
        if (q == 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/LongMathTest.java

        long x = 1000000000000L;
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertEquals(12, LongMath.log10(x, mode));
        }
      }
    
      @GwtIncompatible // TODO
      public void testSqrtNegativeAlwaysThrows() {
        for (long x : NEGATIVE_LONG_CANDIDATES) {
          for (RoundingMode mode : ALL_ROUNDING_MODES) {
            try {
              LongMath.sqrt(x, mode);
              fail("Expected IllegalArgumentException");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
Back to top