12{
13 if (p_plus && (mpfr_cmp_si(&f.re, 0) > 0 ||
14 (mpfr_cmp_si(&f.re, 0) == 0 && mpfr_cmp_si(&f.im, 0) > 0)))
15 o << "+";
16
17 if (p_parens && mpfr_cmp_si(&f.re, 0) != 0 && mpfr_cmp_si(&f.im, 0) != 0) {
18 if (mpfr_cmp_si(&f.re, 0) < 0) {
20
23 o << "-(" << &neg << ")";
25 } else {
26 o << "(" << &f << ")";
27 }
28 } else {
29 if (!p_one && mpfr_cmp_si(&f.re, -1) == 0 && mpfr_cmp_si(&f.im, 0) == 0)
30 o << "-";
31 else if (p_one || mpfr_cmp_si(&f.re, 1) != 0 || mpfr_cmp_si(&f.im, 0) != 0)
32 o << &f;
33 }
34}
void init(ElementType &result) const
void negate(ElementType &result, const ElementType &a) const
static void clear(ElementType &result)