Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for doubleValue (0.08 sec)

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

        }
      }
    
      @AndroidIncompatible // TODO(cpovirk): File bug for BigDecimal.doubleValue().
      public void testBigToDouble() {
        for (BigInteger b : ALL_BIGINTEGER_CANDIDATES) {
          if (b.doubleValue() != DoubleUtils.bigToDouble(b)) {
            failFormat(
                "Converting %s to double: expected doubleValue %s but got bigToDouble %s",
                b, b.doubleValue(), DoubleUtils.bigToDouble(b));
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/DoubleUtilsTest.java

        }
      }
    
      @AndroidIncompatible // TODO(cpovirk): File bug for BigDecimal.doubleValue().
      public void testBigToDouble() {
        for (BigInteger b : ALL_BIGINTEGER_CANDIDATES) {
          if (b.doubleValue() != DoubleUtils.bigToDouble(b)) {
            failFormat(
                "Converting %s to double: expected doubleValue %s but got bigToDouble %s",
                b, b.doubleValue(), DoubleUtils.bigToDouble(b));
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java

          at.set(x);
          assertEquals((float) x, at.floatValue());
        }
      }
    
      /** doubleValue returns current value. */
      public void testDoubleValue() {
        AtomicDouble at = new AtomicDouble();
        assertThat(at.doubleValue()).isEqualTo(0.0d);
        for (double x : VALUES) {
          at.set(x);
          assertBitEquals(x, at.doubleValue());
        }
      }
    
      /** compareAndSet treats +0.0 and -0.0 as distinct values */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/DefaultsTest.java

        assertEquals(0, Defaults.defaultValue(long.class).longValue());
        assertEquals(0.0f, Defaults.defaultValue(float.class).floatValue());
        assertThat(Defaults.defaultValue(double.class).doubleValue()).isEqualTo(0.0d);
        assertNull(Defaults.defaultValue(void.class));
        assertNull(Defaults.defaultValue(String.class));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 03 18:10:55 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

          UnsignedLong unsignedValue = UnsignedLong.fromLongBits(value);
          assertWithMessage("Double value of " + unsignedValue)
              .that(unsignedValue.doubleValue())
              .isEqualTo(unsignedValue.bigIntegerValue().doubleValue());
        }
      }
    
      public void testPlus() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. guava/src/com/google/common/math/BigDecimalMath.java

        private BigDecimalToDoubleRounder() {}
    
        @Override
        double roundToDoubleArbitrarily(BigDecimal bigDecimal) {
          return bigDecimal.doubleValue();
        }
    
        @Override
        int sign(BigDecimal bigDecimal) {
          return bigDecimal.signum();
        }
    
        @Override
        BigDecimal toX(double d, RoundingMode mode) {
          return new BigDecimal(d);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/DoubleUtils.java

        return longBitsToDouble(significand | ONE_BITS);
      }
    
      static double bigToDouble(BigInteger x) {
        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

          UnsignedLong unsignedValue = UnsignedLong.fromLongBits(value);
          assertWithMessage("Double value of " + unsignedValue)
              .that(unsignedValue.doubleValue())
              .isEqualTo(unsignedValue.bigIntegerValue().doubleValue());
        }
      }
    
      public void testPlus() {
        for (long a : TEST_LONGS) {
          for (long b : TEST_LONGS) {
            UnsignedLong aUnsigned = UnsignedLong.fromLongBits(a);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

        for (int i = 0, n = 0; n <= DoubleMath.MAX_FACTORIAL; i++, n += 16) {
          assertThat(DoubleMath.everySixteenthFactorial[i])
              .isEqualTo(BigIntegerMath.factorial(n).doubleValue());
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToInt(double, RoundingMode)
      public void testRoundIntegralDoubleToInt() {
        for (double d : INTEGRAL_DOUBLE_CANDIDATES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/BigDecimalMath.java

        private BigDecimalToDoubleRounder() {}
    
        @Override
        double roundToDoubleArbitrarily(BigDecimal bigDecimal) {
          return bigDecimal.doubleValue();
        }
    
        @Override
        int sign(BigDecimal bigDecimal) {
          return bigDecimal.signum();
        }
    
        @Override
        BigDecimal toX(double d, RoundingMode mode) {
          return new BigDecimal(d);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top