Add quadratic solving