FLINT3.7.0-dev

n_cbrt_estimate, n_cbrt_binary_search, n_cbrt_chebyshev_approx

Synopsis#include <flint/ulong_extras.h>
double n_cbrt_estimate(double a)source
ulong n_cbrt_chebyshev_approx(ulong n)source

Alternative cube root algorithms used by n_cbrt: a bit-manipulation estimate in the spirit of the fast inverse square root, a binary search, and a Chebyshev approximation (requires n \ne 0).

n_cbrt_chebyshev_approx writes n = x \cdot 2^e with x \in [1/2, 1], evaluates a Chebyshev approximation of x^{1/3} and multiplies by 2^{\lfloor e/3 \rfloor} and the cube root of 2^{e \bmod 3}.

Cite this page

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