if (orderOfEquation(equation, parser.getVars()).lt(new BigDec(2)))
return equation;
ArrayList<ConsCell> eqn = foldSigns(getTerms(equation));
BigDec highestCoefficient = getCoefficient(eqn.get(0)), lowestCoefficient = getCoefficient(eqn.get(eqn.size() - 1)), lcm = BigDec.ONE;
if (!highestCoefficient.isInt() || !lowestCoefficient.isInt()) {
lcm = ((BigDec) highestCoefficient.toFraction().getCar(2)).lcm((BigDec) lowestCoefficient.toFraction().getCar(2));
equation = eqn.get(0).getLastConsCell().append(new ConsCell('*', ConsType.OPERATOR, new ConsCell(lcm, ConsType.NUMBER)));
for (int i = 0; i < eqn.size(); i++)
equation = equation.append(new ConsCell('+', ConsType.OPERATOR, eqn.get(i).getLastConsCell().append(new ConsCell('*', ConsType.OPERATOR, new ConsCell(lcm, ConsType.NUMBER))).getFirstConsCell().clone()));
equation = equation.getFirstConsCell();
equation = simplifyTerms(parser.removeDoubles(equation));