A fast quadratic programming method for solving ill-conditioned systems of equations