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)sourceReturns the decimal representation of (x, n) as a null-terminated string, with a leading minus sign if negative is 1; for n = 0 the string is 0. The top limb must be nonzero (if n > 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 = 10, this takes time O(n) (each limb is printed with table lookups for pairs of digits); otherwise x is converted to binary and then to decimal, in time 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-10-20).
@misc{flint-doc-radix-radix-get-str-decimal,
author = {{The FLINT team}},
title = {{radix\_get\_str\_decimal (radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/radix/radix_get_str_decimal.html},
note = {Generated 2026-10-20}
}