Removed dead code
Early exit if all bounds are infinite
Precompute list of quadratics
Fast code for purely quadratic case
Only recompute some precomputed stuff when necessary