Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 45 for Sqrt (1.82 sec)

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

        for (int exp : asList(-1022, -50, -1, 0, 1, 2, 3, 4, 100, 1022, 1023)) {
          for (RoundingMode mode : asList(HALF_EVEN, HALF_UP, HALF_DOWN)) {
            double x = Math.scalb(Math.sqrt(2) + 0.001, exp);
            double y = Math.scalb(Math.sqrt(2) - 0.001, exp);
            if (exp < 0) {
              assertEquals(exp + 1, DoubleMath.log2(x, mode));
              assertEquals(exp, DoubleMath.log2(y, mode));
            } else {
    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)
  2. guava-tests/test/com/google/common/collect/MapsTest.java

      }
    
      private static final Function<Integer, Double> SQRT_FUNCTION = in -> Math.sqrt(in);
    
      public void testTransformValues() {
        Map<String, Integer> map = ImmutableMap.of("a", 4, "b", 9);
        Map<String, Double> transformed = transformValues(map, SQRT_FUNCTION);
    
        assertEquals(ImmutableMap.of("a", 2.0, "b", 3.0), transformed);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 67.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MapsTest.java

      }
    
      private static final Function<Integer, Double> SQRT_FUNCTION = in -> Math.sqrt(in);
    
      public void testTransformValues() {
        Map<String, Integer> map = ImmutableMap.of("a", 4, "b", 9);
        Map<String, Double> transformed = transformValues(map, SQRT_FUNCTION);
    
        assertEquals(ImmutableMap.of("a", 2.0, "b", 3.0), transformed);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 64.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Preconditions.java

     *
     * <pre>{@code
     * public static double sqrt(double value) {
     *   if (value < 0) {
     *     throw new IllegalArgumentException("input is negative: " + value);
     *   }
     *   // calculate square root
     * }
     * }</pre>
     *
     * <p>to be replaced with the more compact
     *
     * <pre>{@code
     * public static double sqrt(double value) {
     *   checkArgument(value >= 0, "input is negative: %s", value);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 11 11:52:14 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Maps.java

       * Map<String, Integer> map = ImmutableMap.of("a", 4, "b", 9);
       * Function<Integer, Double> sqrt =
       *     new Function<Integer, Double>() {
       *       public Double apply(Integer in) {
       *         return Math.sqrt((int) in);
       *       }
       *     };
       * Map<String, Double> transformed = Maps.transformValues(map, sqrt);
       * System.out.println(transformed);
       * }</pre>
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 159.6K bytes
    - Viewed (0)
  6. api/go1.8.txt

    pkg go/doc, func IsPredeclared(string) bool
    pkg go/types, func Default(Type) Type
    pkg go/types, func IdenticalIgnoreTags(Type, Type) bool
    pkg math/big, method (*Float) Scan(fmt.ScanState, int32) error
    pkg math/big, method (*Int) Sqrt(*Int) *Int
    pkg math/rand, func Uint64() uint64
    pkg math/rand, method (*Rand) Uint64() uint64
    pkg math/rand, type Source64 interface, Int63() int64
    pkg math/rand, type Source64 interface { Int63, Seed, Uint64 }
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Dec 21 05:25:57 GMT 2016
    - 16.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/DoubleMath.java

          case UP:
            increment = exponent >= 0 & !isPowerOfTwo(x);
            break;
          case HALF_DOWN:
          case HALF_EVEN:
          case HALF_UP:
            double xScaled = scaleNormalize(x);
            // sqrt(2) is irrational, and the spec is relative to the "exact numerical result,"
            // so log2(x) is never exactly exponent + 0.5.
            increment = (xScaled * xScaled) > 2.0;
            break;
          default:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Multimaps.java

       *      = ImmutableListMultimap.of("a", 4, "a", 16, "b", 9);
       * Function<Integer, Double> sqrt =
       *     new Function<Integer, Double>() {
       *       public Double apply(Integer in) {
       *         return Math.sqrt((int) in);
       *       }
       *     };
       * ListMultimap<String, Double> transformed = Multimaps.transformValues(map,
       *     sqrt);
       * System.out.println(transformed);
       * }</pre>
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  9. src/cmd/cgo/doc.go

    assignment context to retrieve both the return value (if any) and the
    C errno variable as an error (use _ to skip the result value if the
    function returns void). For example:
    
    	n, err = C.sqrt(-1)
    	_, err := C.voidFunc()
    	var n, err = C.sqrt(1)
    
    Calling C function pointers is currently not supported, however you can
    declare Go variables which hold C function pointers and pass them
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableSet.java

        }
        // Guess the size is "halfway between" all duplicates and no duplicates, on a log scale.
        return Math.max(
            ImmutableCollection.Builder.DEFAULT_INITIAL_CAPACITY,
            IntMath.sqrt(inputElementsIncludingAnyDuplicates, RoundingMode.CEILING));
      }
    
      private static final long serialVersionUID = 0xcafebabe;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 35.4K bytes
    - Viewed (0)
Back to top