Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 102 for Odivide (0.18 sec)

  1. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K 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/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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/UnsignedLong.java

      }
    
      /**
       * Returns the result of dividing this by {@code val}.
       *
       * @since 14.0
       */
      public UnsignedLong dividedBy(UnsignedLong val) {
        return fromLongBits(UnsignedLongs.divide(value, checkNotNull(val).value));
      }
    
      /**
       * Returns this modulo {@code val}.
       *
       * @since 14.0
       */
      public UnsignedLong mod(UnsignedLong val) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:09:25 GMT 2021
    - 8.9K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += BigIntegerMath.sqrt(positive[j], mode).intValue();
        }
        return tmp;
      }
    
      @Benchmark
      int divide(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += BigIntegerMath.divide(nonzero1[j], nonzero2[j], mode).intValue();
        }
        return tmp;
      }
    
      @Benchmark
      long roundToDouble(int reps) {
        long tmp = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 30 13:06:20 GMT 2020
    - 2.8K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java

          hexStrings[i] = UnsignedLongs.toString(longs[i], 16);
          prefixedHexStrings[i] = "0x" + hexStrings[i];
        }
      }
    
      @Benchmark
      long divide(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += UnsignedLongs.divide(longs[j], divisors[j]);
        }
        return tmp;
      }
    
      @Benchmark
      long remainder(int reps) {
        long tmp = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/LongMath.java

        a >>= aTwos; // divide out all 2s
        int bTwos = Long.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
        while (a != b) { // both a, b are odd
          // The key to the binary GCD algorithm is as follows:
          // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
    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)
Back to top