- if (it->coeff.compare(_num1()) == 0) {
- it->rest.bp->printcsrc(os, type, precedence);
- } else if (it->coeff.compare(_num_1()) == 0) {
- os << "-";
- it->rest.bp->printcsrc(os, type, precedence);
- } else if (ex_to_numeric(it->coeff).numer().compare(_num1()) == 0) {
- it->rest.bp->printcsrc(os, type, precedence);
- os << "/";
- ex_to_numeric(it->coeff).denom().printcsrc(os, type, precedence);
- } else if (ex_to_numeric(it->coeff).numer().compare(_num_1()) == 0) {
- os << "-";
- it->rest.bp->printcsrc(os, type, precedence);
- os << "/";
- ex_to_numeric(it->coeff).denom().printcsrc(os, type, precedence);
+ if (it->coeff.is_equal(_ex1)) {
+ it->rest.print(c, precedence());
+ } else if (it->coeff.is_equal(_ex_1)) {
+ c.s << "-";
+ it->rest.print(c, precedence());
+ } else if (ex_to<numeric>(it->coeff).numer().is_equal(_num1)) {
+ it->rest.print(c, precedence());
+ c.s << "/";
+ ex_to<numeric>(it->coeff).denom().print(c, precedence());
+ } else if (ex_to<numeric>(it->coeff).numer().is_equal(_num_1)) {
+ c.s << "-";
+ it->rest.print(c, precedence());
+ c.s << "/";
+ ex_to<numeric>(it->coeff).denom().print(c, precedence());