The help of lsqrsolve is wrong for the info argument.
Reported by Michael BAUDIN
Originally assigned to Michael BAUDIN
There are errors in the help page of lsqrsolve.
The help states:
info = 1: algorithm estimates that the relative error between x and the solution is at most tol.
while the source code states:
info = 1 : both actual and predicted relative reductions in the sum of squares are at most ftol
The help states:
info: 2 number of calls to fcn reached
while the source code indicates:
info = 2 : relative error between two consecutive iterates is at most xtol.
The source code of lsqrsolve uses either lmdif or lmder.
http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/optimization/sci_gateway/fortran/intlsqrsolve.f;h=547621b9914bb75b59da4f6c1c4297a8c5b55538;hb=HEAD
The comments at the end of the Fortran source for lsqrsolve are wrong.
The correct status for info is given in lmdif:
http://gitweb.scilab.org/?p=scilab.git;a=blob_plain;f=scilab/modules/optimization/src/fortran/minpack/lmdif.f;hb=HEAD
or lmder:
http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/optimization/src/fortran/minpack/lmder.f;h=8797d8bed89883c79ed741575e502d24ae2140a4;hb=HEAD