Returns true if x is exactly equal to 2^k for some finite integer k.
(double x)
| 191 | */ |
| 192 | |
| 193 | @GwtIncompatible // com.google.common.math.DoubleUtils |
| 194 | public static boolean isPowerOfTwo(double x) { |
| 195 | return x > 0.0 && isFinite(x) && LongMath.isPowerOfTwo(getSignificand(x)); |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Returns the base 2 logarithm of a double value. |
no test coverage detected