Skip to content

log2

Base-2 logarithm.

Y = log2(X)

Returns log(X) / log(2). Useful for information-theoretic quantities and digital-signal processing.

log2(8) % 3
  • log — Natural logarithm (base e).
  • log10 — Base-10 logarithm.