A nonlinear least-squares minimizer