FLINT_BIT_COUNT
Synopsis
#include <flint/longlong.h>flint_bitcnt_t FLINT_BIT_COUNT(ulong x)sourceReturns the number of bits of x, that is, \lfloor \log_2 x \rfloor + 1 for x \ge 1, and 0 for x = 0. The result is unsigned, so expressions such as FLINT_BIT_COUNT(x) - 1 wrap around for x = 0.
Guides#
Cite this page
The FLINT team, “FLINT_BIT_COUNT (longlong.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/longlong/FLINT_BIT_COUNT.html (generated 2026-10-20).
@misc{flint-doc-longlong-FLINT-BIT-COUNT,
author = {{The FLINT team}},
title = {{FLINT\_BIT\_COUNT (longlong.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/longlong/FLINT_BIT_COUNT.html},
note = {Generated 2026-10-20}
}