log2 method

double log2(
  1. double value
)

Calculates the base-2 logarithm of the given value.

Implementation

double log2(double value) {
  return math.log(value) / math.ln2;
}