FLINT3.7.0-dev

radix_get_str_decimal

Synopsis#include <flint/radix.h>
char * radix_get_str_decimal(char * res, nn_srcptr x, slong n, int negative, const radix_t radix)source

Returns the decimal representation of (x,n)(x, n) as a null-terminated string, with a leading minus sign if negative is 1; for n=0n = 0 the string is 0. The top limb must be nonzero (if n>0n > 0). If res is NULL, a new string is allocated with flint_malloc; otherwise res must have room for the result and the terminating null. If b=10b = 10, this takes time O(n)O(n) (each limb is printed with table lookups for pairs of digits); otherwise xx is converted to binary and then to decimal, in time O(M(n)log⁡n)O(M(n) \log n).

Guides#

Cite this page

The FLINT team, “radix_get_str_decimal (radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/radix/radix_get_str_decimal.html (generated 2026-11-02).