public string Format(Style style) { string s = ""; if (op == "id") { s += Monomial.Format(args[0], style); } else if (op == "time") { s += op; } else if (op == "poly 1/[]") { s += "1/[" + Monomial.Format(args[0], style) + "]"; } else if (op == "poly []^(1/[])") { s += "[" + Monomial.Format(args[0], style) + "]^1/[" + Monomial.Format(args[1], style) + "]"; } else { string sargs = ""; for (int i = 0; i < args.Length; i++) { sargs += Monomial.Format(args[i], style) + ((i == args.Length - 1) ? "" : ","); } s += op + "(" + sargs + ")"; } if (splitOp == Split.Pos) { s = "pos(" + s + ")"; } if (splitOp == Split.Neg) { s = "pos(-" + s + ")"; } return(var.Format(style) + " = " + s); }
public string Format(Style style) { return(Monomial.Format(this.monomials, style)); }