- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for bigToDouble (0.72 seconds)
-
android/guava-tests/test/com/google/common/math/DoubleUtilsTest.java
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)); } } } public void testEnsureNonNegative() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 05:21:26 GMT 2026 - 2.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/DoubleUtilsTest.java
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)); } } } public void testEnsureNonNegative() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 05:21:26 GMT 2026 - 2.5K bytes - Click Count (0) -
android/guava/src/com/google/common/math/DoubleUtils.java
* normal, and finite. */ static double scaleNormalize(double x) { long significand = doubleToRawLongBits(x) & SIGNIFICAND_MASK; 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)))
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 04:51:56 GMT 2026 - 5K bytes - Click Count (0) -
android/guava/src/com/google/common/math/BigIntegerMath.java
} @GwtIncompatible // TODO private static BigInteger sqrtFloor(BigInteger x) { /* * Adapted from Hacker's Delight, Figure 11-1. * * Using DoubleUtils.bigToDouble, getting a double approximation of x is extremely fast, and * then we can get a double approximation of the square root. Then, we iteratively improve this
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 18.8K bytes - Click Count (0)