FLINT3.7.0-dev

n_revbin

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

Returns nn with its lowest bb bits in reverse order; for example the 6-bit number 0101102010110_2 becomes 0110102011010_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-11-02).