Least-Squares Approximation And Ill-Conditioned Linear Systems