356{
359
360 bool needs_parens = p_parens && (n > 1);
361 if (needs_parens)
362 {
363 if (p_plus) o << '+';
364 o << '(';
365 p_plus = false;
366 }
367
368 p_one = false;
369 for (Nterm& t : f)
370 {
371 int isone =
M_->is_one(t.monom);
372 p_parens = !isone;
373 K_->elem_text_out(o, t.coeff, p_one, p_plus, p_parens);
375 o << "{" << EXP[1];
376 for (
int i = 2; i <=
nvars_ && EXP[i] != 0; i++) o <<
"," << EXP[i];
377 o << "}";
378 p_plus = true;
379 }
380 if (needs_parens) o << ')';
381}
exponents::Exponents exponents_t
int n_terms(const ring_elem f) const
void to_partition(const int *m, int *exp) const
#define ALLOCATE_EXPONENTS(byte_len)