Two numerical methods that converge to the method of least squares