NAME
clz – count leading zero bits of an integer

SYNOPSIS
#include <u.h>
#include <libc.h>

int clz(uvlong n)

DESCRIPTION
Clz returns the number of contiguous leading zero bits, including the most–significant bit, in n. This number can be used to approximate log2(n).

SOURCE
/sys/src/libc/*/*clz*.[cs]

SEE ALSO
exp(2)
Copyright © 2025 Plan 9 Foundation