FLINT3.7.0-dev

flint_clz, flint_ctz

Synopsis#include <flint/longlong.h>
flint_clz(x)source
flint_ctz(x)source

The number of leading (most significant) and trailing (least significant) zero bits of the word x, as an int. The result is undefined for x = 0. flint_clz(x) is the shift that normalises x, that is, makes its top bit 1.

Guides#

Cite this page

The FLINT team, “flint_clz, flint_ctz (longlong.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/longlong/flint_clz.html (generated 2026-10-20).