ac-library-hs-0.1.0.0: Data structures and algorithms
Safe HaskellNone
LanguageGHC2021

AtCoder.Internal.Bit

Contents

Description

Bit operations not in the Bits module.

Example

>>> bitCeil 0
1
>>> bitCeil 1
1
>>> bitCeil 2
2
>>> bitCeil 3
4
>>> bitCeil 4
4

Since: 1.0.0

Synopsis

Utilities

bitCeil :: Int -> Int #

\(O(w)\) Returns minimum \(2^i s.t. 2^i \geq n\).

Since: 1.0.0