FLINT3.7.0-dev

n_root, n_rootrem

Synopsis#include <flint/ulong_extras.h>
ulong n_root(ulong n, ulong root)source
ulong n_rootrem(ulong * remainder, ulong n, ulong root)source

Returns r = \lfloor n^{1/k} \rfloor for k = \mathit{root}, or 0 if n or k is 0. n_rootrem also sets the remainder n - r^k.

Cite this page

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