package octez-proto-libs

  1. Overview
  2. Docs
val numbits : int -> int

Assuming x >= 0, numbits x is the number of bits needed to represent x. This is also the unique k such that 2^{k - 1} <= x < 2^k if x > 0 and 0 otherwise.

OCaml

Innovation. Community. Security.