Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 600 for double (0.21 sec)

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

       * value).hashCode()}.
       *
       * <p><b>Java 8+ users:</b> use {@link Double#hashCode(double)} instead.
       *
       * @param value a primitive {@code double} value
       * @return a hash code for the value
       */
      public static int hashCode(double value) {
        return ((Double) value).hashCode();
        // TODO(kevinb): do it this way when we can (GWT problem):
        // long bits = Double.doubleToLongBits(value);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/PairedStatsAccumulator.java

          return LinearTransformation.vertical(xStats.mean());
        }
      }
    
      private double ensurePositive(double value) {
        if (value > 0.0) {
          return value;
        } else {
          return Double.MIN_VALUE;
        }
      }
    
      private static double ensureInUnitRange(double value) {
        return Doubles.constrainToRange(value, -1.0, 1.0);
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/DoubleMath.java

      public static int roundToInt(double x, RoundingMode mode) {
        double z = roundIntermediate(x, mode);
        checkInRangeForRoundingInputs(
            z > MIN_INT_AS_DOUBLE - 1.0 & z < MAX_INT_AS_DOUBLE + 1.0, x, mode);
        return (int) z;
      }
    
      private static final double MIN_INT_AS_DOUBLE = -0x1p31;
      private static final double MAX_INT_AS_DOUBLE = 0x1p31 - 1.0;
    
      /**
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/DoubleArrayAsListTest.java

          Double[] suffix = {(double) 86, (double) 99};
          Double[] all = concat(concat(prefix, elements), suffix);
          return asList(all).subList(2, elements.length + 2);
        }
      }
    
      private static Double[] concat(Double[] left, Double[] right) {
        Double[] result = new Double[left.length + right.length];
        System.arraycopy(left, 0, result, 0, left.length);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/MathTesting.java

      }
    
      static final ImmutableSet<Double> INTEGRAL_DOUBLE_CANDIDATES;
      static final ImmutableSet<Double> FRACTIONAL_DOUBLE_CANDIDATES;
      static final Iterable<Double> INFINITIES =
          Doubles.asList(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY);
      static final Iterable<Double> FINITE_DOUBLE_CANDIDATES;
      static final Iterable<Double> POSITIVE_FINITE_DOUBLE_CANDIDATES;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/DoubleArrayAsListTest.java

          Double[] suffix = {(double) 86, (double) 99};
          Double[] all = concat(concat(prefix, elements), suffix);
          return asList(all).subList(2, elements.length + 2);
        }
      }
    
      private static Double[] concat(Double[] left, Double[] right) {
        Double[] result = new Double[left.length + right.length];
        System.arraycopy(left, 0, result, 0, left.length);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/math/StatsBenchmark.java

        KAHAN {
          @Override
          double mean(double[] values) {
            double sum = 0.0;
            double c = 0.0;
            for (double value : values) {
              double y = value - c;
              double t = sum + y;
              c = (t - sum) - y;
              sum = t;
            }
            return sum / values.length;
          }
        },
        KNUTH {
          @Override
          double mean(double[] values) {
            double mean = values[0];
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/math/StatsBenchmark.java

        KAHAN {
          @Override
          double mean(double[] values) {
            double sum = 0.0;
            double c = 0.0;
            for (double value : values) {
              double y = value - c;
              double t = sum + y;
              c = (t - sum) - y;
              sum = t;
            }
            return sum / values.length;
          }
        },
        KNUTH {
          @Override
          double mean(double[] values) {
            double mean = values[0];
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/BigDecimalMathTest.java

        BigDecimal maxDoubleAsBD = new BigDecimal(Double.MAX_VALUE);
        new RoundToDoubleTester(maxDoubleAsBD).setExpectation(Double.MAX_VALUE, values()).test();
      }
    
      public void testRoundToDouble_maxDoublePlusOne() {
        BigDecimal maxDoubleAsBD = new BigDecimal(Double.MAX_VALUE).add(BigDecimal.ONE);
        new RoundToDoubleTester(maxDoubleAsBD)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
    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)
  10. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

      }
    
      public void testLog2NaNInfinity() {
        assertEquals(Double.POSITIVE_INFINITY, DoubleMath.log2(Double.POSITIVE_INFINITY));
        assertTrue(Double.isNaN(DoubleMath.log2(Double.NEGATIVE_INFINITY)));
        assertTrue(Double.isNaN(DoubleMath.log2(Double.NaN)));
      }
    
      @GwtIncompatible // StrictMath
      private strictfp double trueLog2(double d) {
    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)
Back to top