Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 534 for sqrt (0.19 sec)

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

            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(LongMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(long, FLOOR). */
      @GwtIncompatible // TODO
      public void testSqrtExactMatchesFloorOrThrows() {
        for (long x : POSITIVE_LONG_CANDIDATES) {
          long sqrtFloor = LongMath.sqrt(x, FLOOR);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  2. 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 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/IntMathTest.java

            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(IntMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(int, FLOOR). */
      @GwtIncompatible // sqrt
      public void testSqrtExactMatchesFloorOrThrows() {
        for (int x : POSITIVE_INTEGER_CANDIDATES) {
          int floor = IntMath.sqrt(x, FLOOR);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/LongMathTest.java

            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(LongMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(long, FLOOR). */
      @GwtIncompatible // TODO
      public void testSqrtExactMatchesFloorOrThrows() {
        for (long x : POSITIVE_LONG_CANDIDATES) {
          long sqrtFloor = LongMath.sqrt(x, FLOOR);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += IntMath.log10(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int sqrt(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.sqrt(positive[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int divide(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

            .isWithin(ALLOWED_ERROR * sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS))
            .of(sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS / LONG_MANY_VALUES_COUNT));
        assertThat(longManyValuesAccumulatorByAddAllVarargs.populationStandardDeviation())
            .isWithin(ALLOWED_ERROR * sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS))
            .of(sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS / LONG_MANY_VALUES_COUNT));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 36.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          BigInteger plusHalfSquared = result.pow(2).add(result).shiftLeft(2).add(ONE);
          BigInteger x4 = x.shiftLeft(2);
          // sqrt(x) <= result + 0.5, so 4 * x <= (result + 0.5)^2 * 4
          // (result + 0.5)^2 * 4 = (result^2 + result)*4 + 1
          assertTrue(x4.compareTo(plusHalfSquared) <= 0);
          BigInteger minusHalfSquared = result.pow(2).subtract(result).shiftLeft(2).add(ONE);
    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)
  8. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          BigInteger plusHalfSquared = result.pow(2).add(result).shiftLeft(2).add(ONE);
          BigInteger x4 = x.shiftLeft(2);
          // sqrt(x) <= result + 0.5, so 4 * x <= (result + 0.5)^2 * 4
          // (result + 0.5)^2 * 4 = (result^2 + result)*4 + 1
          assertTrue(x4.compareTo(plusHalfSquared) <= 0);
          BigInteger minusHalfSquared = result.pow(2).subtract(result).shiftLeft(2).add(ONE);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/StatsTest.java

        assertThat(INTEGER_MANY_VALUES_STATS_ITERABLE.populationStandardDeviation())
            .isWithin(ALLOWED_ERROR * sqrt(INTEGER_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS))
            .of(sqrt(INTEGER_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS / INTEGER_MANY_VALUES_COUNT));
        assertThat(LONG_MANY_VALUES_STATS_ITERATOR.populationStandardDeviation())
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 32.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java

            .isWithin(ALLOWED_ERROR * sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS))
            .of(sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS / LONG_MANY_VALUES_COUNT));
        assertThat(longManyValuesAccumulatorByAddAllVarargs.populationStandardDeviation())
            .isWithin(ALLOWED_ERROR * sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS))
            .of(sqrt(LONG_MANY_VALUES_SUM_OF_SQUARES_OF_DELTAS / LONG_MANY_VALUES_COUNT));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 34K bytes
    - Viewed (0)
Back to top