Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,041 for nextUp (0.19 sec)

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

            return (cmpXToRoundArbitrarily <= 0) ? roundArbitrarily : Math.nextUp(roundArbitrarily);
          case DOWN:
            if (sign(x) >= 0) {
              return (cmpXToRoundArbitrarily >= 0)
                  ? roundArbitrarily
                  : DoubleUtils.nextDown(roundArbitrarily);
            } else {
              return (cmpXToRoundArbitrarily <= 0) ? roundArbitrarily : Math.nextUp(roundArbitrarily);
            }
          case UP:
            if (sign(x) >= 0) {
    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/math/BigDecimalMathTest.java

        new RoundToDoubleTester(BigDecimal.valueOf((1L << 53) + 1))
            .setExpectation(twoToThe53, DOWN, FLOOR, HALF_DOWN, HALF_EVEN)
            .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      public void testRoundToDouble_twoToThe54PlusOne() {
        double twoToThe54 = Math.pow(2, 54);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/BigDecimalMathTest.java

        new RoundToDoubleTester(BigDecimal.valueOf((1L << 53) + 1))
            .setExpectation(twoToThe53, DOWN, FLOOR, HALF_DOWN, HALF_EVEN)
            .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      public void testRoundToDouble_twoToThe54PlusOne() {
        double twoToThe54 = Math.pow(2, 54);
    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)
  4. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

          trueLog2 = StrictMath.nextUp(trueLog2);
        }
        // decrement until it's <= the true value
        while (StrictMath.pow(2.0, trueLog2) > d) {
          trueLog2 = StrictMath.nextAfter(trueLog2, Double.NEGATIVE_INFINITY);
        }
        if (StrictMath.abs(StrictMath.pow(2.0, trueLog2) - d)
            > StrictMath.abs(StrictMath.pow(2.0, StrictMath.nextUp(trueLog2)) - d)) {
          trueLog2 = StrictMath.nextUp(trueLog2);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/DoubleMathTest.java

          trueLog2 = StrictMath.nextUp(trueLog2);
        }
        // decrement until it's <= the true value
        while (StrictMath.pow(2.0, trueLog2) > d) {
          trueLog2 = StrictMath.nextAfter(trueLog2, Double.NEGATIVE_INFINITY);
        }
        if (StrictMath.abs(StrictMath.pow(2.0, trueLog2) - d)
            > StrictMath.abs(StrictMath.pow(2.0, StrictMath.nextUp(trueLog2)) - d)) {
          trueLog2 = StrictMath.nextUp(trueLog2);
    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)
  6. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        new RoundToDoubleTester(BigInteger.valueOf((1L << 53) + 1))
            .setExpectation(twoToThe53, DOWN, FLOOR, HALF_DOWN, HALF_EVEN)
            .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_twoToThe54PlusOne() {
    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)
  7. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        new RoundToDoubleTester(BigInteger.valueOf((1L << 53) + 1))
            .setExpectation(twoToThe53, DOWN, FLOOR, HALF_DOWN, HALF_EVEN)
            .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_twoToThe54PlusOne() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/DoubleUtils.java

     *
     * @author Louis Wasserman
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    final class DoubleUtils {
      private DoubleUtils() {}
    
      static double nextDown(double d) {
        return -Math.nextUp(-d);
      }
    
      // The mask for the significand, according to the {@link
      // Double#doubleToRawLongBits(double)} spec.
      static final long SIGNIFICAND_MASK = 0x000fffffffffffffL;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/math/MathTesting.java

          for (int direction : new int[] {1, -1}) {
            double d = Double.longBitsToDouble(Double.doubleToLongBits(Math.scalb(1.0, i)) + direction);
            // Math.nextUp/nextDown
            if (d != Math.rint(d)) {
              fractionalBuilder.add(d);
            }
          }
        }
        for (double d :
            Doubles.asList(
                0,
                1,
                2,
    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)
  10. android/guava/src/com/google/common/math/LongMath.java

            return (cmpXToRoundArbitrarily <= 0) ? roundArbitrarily : Math.nextUp(roundArbitrarily);
          case DOWN:
            if (x >= 0) {
              return (cmpXToRoundArbitrarily >= 0)
                  ? roundArbitrarily
                  : DoubleUtils.nextDown(roundArbitrarily);
            } else {
              return (cmpXToRoundArbitrarily <= 0) ? roundArbitrarily : Math.nextUp(roundArbitrarily);
            }
          case UP:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
Back to top