237{
238 if (f == nullptr)
239 {
240 o << "0";
241 return;
242 }
243
244 bool p_one = false;
245 bool p_parens = true;
246 bool p_plus = false;
247 for (const resterm *t = f; t != nullptr; t = t->next)
248 {
249 int isone =
M->is_one(t->monom);
250 K->elem_text_out(o, t->coeff, p_one, p_parens, p_plus);
251 if (!isone)
M->elem_text_out(o, t->monom, p_one);
252 o << "<" << t->comp->me << ">";
253 p_plus = true;
254 }
255}