Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for sqeuclidean (0.18 sec)

  1. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        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)))
    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)
  2. guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        // Use a seed so that the test is deterministic:
        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)))
    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)
  3. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        // Use a seed so that the test is deterministic:
        Random r = new Random(0L);
        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)))
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        // Use a seed so that the test is deterministic:
        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)))
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/IntMath.java

        } else if (b == 0) {
          return a; // similar logic
        }
        /*
         * Uses the binary GCD algorithm; see http://en.wikipedia.org/wiki/Binary_GCD_algorithm. This is
         * >40% faster than the Euclidean algorithm in benchmarks.
         */
        int aTwos = Integer.numberOfTrailingZeros(a);
        a >>= aTwos; // divide out all 2s
        int bTwos = Integer.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/LongMath.java

        } else if (b == 0) {
          return a; // similar logic
        }
        /*
         * Uses the binary GCD algorithm; see http://en.wikipedia.org/wiki/Binary_GCD_algorithm. This is
         * >60% faster than the Euclidean algorithm in benchmarks.
         */
        int aTwos = Long.numberOfTrailingZeros(a);
        a >>= aTwos; // divide out all 2s
        int bTwos = Long.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
Back to top