MCPcopy Create free account
hub / github.com/antlr/codebuff / log2

Method log2

output/java_guava/1.4.19/DoubleMath.java:215–217  ·  view source on GitHub ↗

Returns the base 2 logarithm of a double value. Special cases: If x is NaN or less than zero, the result is NaN. If x is positive infinity, the result is positive infinity. If x is positive or negative zero, the result is negative infinity. The

(double x)

Source from the content-addressed store, hash-verified

213
214
215 public static double log2(double x) {
216 return log(x) / LN_2; // surprisingly within 1 ulp according to tests
217 }
218
219 private static final double LN_2 = log(2);
220

Callers

nothing calls this directly

Calls 7

isPowerOfTwoMethod · 0.95
logMethod · 0.80
checkArgumentMethod · 0.45
isFiniteMethod · 0.45
isNormalMethod · 0.45
scaleNormalizeMethod · 0.45

Tested by

no test coverage detected