FLINT3.7.0-dev

z_sizeinbase

Synopsis#include <flint/long_extras.h>
size_t z_sizeinbase(slong n, int b)source

Returns the number of digits of |n| in base b \ge 2, the sign not counted. For n = 0 it returns 1. Unlike GMP's mpz_sizeinbase, the result is exact for every base.

Cite this page

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