Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for isInfinite (0.22 sec)

  1. android/guava/src/com/google/common/math/ToDoubleRounder.java

      final double roundToDouble(X x, RoundingMode mode) {
        checkNotNull(x, "x");
        checkNotNull(mode, "mode");
        double roundArbitrarily = roundToDoubleArbitrarily(x);
        if (Double.isInfinite(roundArbitrarily)) {
          switch (mode) {
            case DOWN:
            case HALF_EVEN:
            case HALF_DOWN:
            case HALF_UP:
              return Double.MAX_VALUE * sign(x);
            case FLOOR:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/FloatsTest.java

          assertThat(Floats.hashCode(value)).isEqualTo(((Float) value).hashCode());
        }
      }
    
      public void testIsFinite() {
        for (float value : NUMBERS) {
          assertThat(Floats.isFinite(value))
              .isEqualTo(!(Float.isInfinite(value) || Float.isNaN(value)));
        }
      }
    
      public void testCompare() {
        for (float x : VALUES) {
          for (float y : VALUES) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/DoubleMathTest.java

      public void testIsPowerOfTwo() {
        for (double x : ALL_DOUBLE_CANDIDATES) {
          boolean expected =
              x > 0
                  && !Double.isInfinite(x)
                  && !Double.isNaN(x)
                  && StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          assertEquals(expected, DoubleMath.isPowerOfTwo(x));
        }
      }
    
    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)
  4. android/guava/src/com/google/common/primitives/Floats.java

       * necessarily implemented as, {@code !(Float.isInfinite(value) || Float.isNaN(value))}.
       *
       * <p><b>Java 8+ users:</b> use {@link Float#isFinite(float)} instead.
       *
       * @since 10.0
       */
      public static boolean isFinite(float value) {
        return NEGATIVE_INFINITY < value && value < POSITIVE_INFINITY;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/DoublesTest.java

          assertThat(Doubles.hashCode(value)).isEqualTo(((Double) value).hashCode());
        }
      }
    
      public void testIsFinite() {
        for (double value : NUMBERS) {
          assertThat(Doubles.isFinite(value))
              .isEqualTo(!(Double.isNaN(value) || Double.isInfinite(value)));
        }
      }
    
      public void testCompare() {
        for (double x : VALUES) {
          for (double y : VALUES) {
            // note: spec requires only that the sign is the same
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 31.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

          assertThat(Doubles.hashCode(value)).isEqualTo(((Double) value).hashCode());
        }
      }
    
      public void testIsFinite() {
        for (double value : NUMBERS) {
          assertThat(Doubles.isFinite(value))
              .isEqualTo(!(Double.isNaN(value) || Double.isInfinite(value)));
        }
      }
    
      public void testCompare() {
        for (double x : VALUES) {
          for (double y : VALUES) {
            // note: spec requires only that the sign is the same
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 31.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

      public void testIsPowerOfTwo() {
        for (double x : ALL_DOUBLE_CANDIDATES) {
          boolean expected =
              x > 0
                  && !Double.isInfinite(x)
                  && !Double.isNaN(x)
                  && StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          assertEquals(expected, DoubleMath.isPowerOfTwo(x));
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Doubles.java

       * necessarily implemented as, {@code !(Double.isInfinite(value) || Double.isNaN(value))}.
       *
       * <p><b>Java 8+ users:</b> use {@link Double#isFinite(double)} instead.
       *
       * @since 10.0
       */
      public static boolean isFinite(double value) {
        return NEGATIVE_INFINITY < value && value < POSITIVE_INFINITY;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/TraverserTest.java

        assertEqualCharNodes(result, "bfaecd");
        assertEqualCharNodes(result, "bfaecd");
      }
    
      @Test
      public void forGraph_breadthFirst_infinite() {
        Iterable<Integer> result =
            Traverser.forGraph(fixedSuccessors(Iterables.cycle(1, 2, 3))).breadthFirst(0);
        assertThat(Iterables.limit(result, 4)).containsExactly(0, 1, 2, 3).inOrder();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/Quantiles.java

     * you would expect.
     *
     * <p>If required to do a weighted average between an infinity and a finite value, or between an
     * infinite value and itself, the infinite value is returned. If required to do a weighted average
     * between {@link Double#NEGATIVE_INFINITY NEGATIVE_INFINITY} and {@link Double#POSITIVE_INFINITY
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 29.9K bytes
    - Viewed (0)
Back to top