Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for divider (0.43 sec)

  1. android/guava/src/com/google/common/primitives/UnsignedLongs.java

       *
       * @param dividend the dividend (numerator)
       * @param divisor the divisor (denominator)
       * @throws ArithmeticException if divisor is 0
       * @since 11.0
       */
      public static long remainder(long dividend, long divisor) {
        if (divisor < 0) { // i.e., divisor >= 2^63:
          if (compare(dividend, divisor) < 0) {
            return dividend; // dividend < divisor
          } else {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        for (int i = 0; i < 1000000; i++) {
          long dividend = r.nextLong();
          long divisor = r.nextLong();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedLongs.divide(dividend, divisor)
                          + UnsignedLongs.remainder(dividend, divisor)))
              .isEqualTo(0);
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        for (int i = 0; i < 1000000; i++) {
          long dividend = r.nextLong();
          long divisor = r.nextLong();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedLongs.divide(dividend, divisor)
                          + UnsignedLongs.remainder(dividend, divisor)))
              .isEqualTo(0);
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInts.java

        return (int) (toLong(dividend) / toLong(divisor));
      }
    
      /**
       * Returns dividend % divisor, where the dividend and divisor are treated as unsigned 32-bit
       * quantities.
       *
       * <p><b>Java 8+ users:</b> use {@link Integer#remainderUnsigned(int, int)} instead.
       *
       * @param dividend the dividend (numerator)
       * @param divisor the divisor (denominator)
       * @throws ArithmeticException if divisor is 0
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          int dividend = r.nextInt();
          int divisor = r.nextInt();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedInts.divide(dividend, divisor)
                          + UnsignedInts.remainder(dividend, divisor)))
              .isEqualTo(0);
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        Random r = new Random(0L);
        for (int i = 0; i < 1000000; i++) {
          int dividend = r.nextInt();
          int divisor = r.nextInt();
          // Test that the Euclidean property is preserved:
          assertThat(
                  dividend
                      - (divisor * UnsignedInts.divide(dividend, divisor)
                          + UnsignedInts.remainder(dividend, divisor)))
              .isEqualTo(0);
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/IntMath.java

        a >>= aTwos; // divide out all 2s
        int bTwos = Integer.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
    - 23.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/QuantilesTest.java

        // ceil(199*index/2).
        if (index % 2 == 0) {
          int position = IntMath.divide(199 * index, 2, UNNECESSARY);
          return PSEUDORANDOM_DATASET_SORTED.get(position);
        } else {
          int positionFloor = IntMath.divide(199 * index, 2, FLOOR);
          int positionCeil = IntMath.divide(199 * index, 2, CEILING);
          double lowerValue = PSEUDORANDOM_DATASET_SORTED.get(positionFloor);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/QuantilesTest.java

        // ceil(199*index/2).
        if (index % 2 == 0) {
          int position = IntMath.divide(199 * index, 2, UNNECESSARY);
          return PSEUDORANDOM_DATASET_SORTED.get(position);
        } else {
          int positionFloor = IntMath.divide(199 * index, 2, FLOOR);
          int positionCeil = IntMath.divide(199 * index, 2, CEILING);
          double lowerValue = PSEUDORANDOM_DATASET_SORTED.get(positionFloor);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.7K 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