Equation generation improvement