Error Estimates For Least-Squares Problems