FLINT3.7.0-dev

n_revbin

Synopsis#include <flint/ulong_extras.h>
ulong n_revbin(ulong n, ulong b)source

Returns n with its lowest b bits in reverse order; for example the 6-bit number 010110_2 becomes 011010_2.

Cite this page

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