12 if (newcap > n) n = newcap;
29 int len0 =
static_cast<int>(len);
40 snprintf(
s, N,
"%d", n);
48 snprintf(
s, N,
"%*d", width, n);
56 snprintf(
s, N,
"%ld", n);
64 snprintf(
s, N,
"%g", n);
72 snprintf(
s, N,
"%*ld", width, n);
80 snprintf(
s, N,
"%u", n);
88 snprintf(
s, N,
"%lu", n);
96 snprintf(
s, N,
"%llu", n);
104 snprintf(
s, N,
"%*u", width, n);
112 snprintf(
s, N,
"%*lu", width, n);
121 n = mpfr_snprintf(
nullptr, 0,
"%Rg",
x);
123 mpfr_snprintf(
s.data(),
s.size() + 1,
"%Rg",
x);
138 if (
x->re !=0 || (
x->re == 0 &&
x->im == 0)) {
156 if (mpfr_cmp_si(&
x->re, 0) !=0 ||
157 (mpfr_cmp_si(&
x->re, 0) == 0 && mpfr_cmp_si(&
x->im, 0) == 0)) {
159 if (mpfr_cmp_si(&
x->im, 0) > 0)
163 if (mpfr_cmp_si(&
x->im, 0) != 0) {
164 if (mpfr_cmp_si(&
x->im, -1) == 0)
166 else if (mpfr_cmp_si(&
x->im, 1) != 0)
174 if (!mpfi_is_zero(&
x->re) ||
175 mpfi_is_zero(&
x->re) && mpfi_is_zero(&
x->im)) {
177 if (!mpfi_is_zero(&
x->im))
181 if (!mpfi_is_zero(&
x->im)) {
Append-only GC-backed byte buffer used throughout the engine for text output.
M2_string M2_tostringn(char *s, int n)
#define newarray_atomic(T, len)
cc_struct const * cc_srcptr
cc_doubles_struct const * cc_doubles_srcptr
cci_struct const * cci_srcptr
ring_elem — the universal value type carried by every Ring* in the engine.