"""
This type stub file was generated by pyright.
"""

__all__ = ["ceil_log2", "exact_log2", "bits_for"]

def bits_for(n:int, require_sign_bit:bool=...) -> int:
    ...


def ceil_log2(n : int) -> int:
    """Returns the integer log2 of the smallest power-of-2 greater than or equal to ``n``.

    Raises a ``ValueError`` for negative inputs.
    """
    ...

def exact_log2(n : int) -> int:
    """Returns the integer log2 of ``n``, which must be an exact power of two.

    Raises a ``ValueError`` if ``n`` is not a power of two.
    """
    ...
