An Efficient Code for the Minimization of Highly Nonlinear and Large Residual Least Squares Functions