certik / minpack

Library for solving nonlinear equations and nonlinear least squares problems
http://www.netlib.org/minpack/
Other
32 stars 10 forks source link

Wrong intent for arguments to FCN() in example_lmder1.f90 #7

Closed xecej4 closed 2 years ago

xecej4 commented 2 years ago

The INTENT of arguments fvec and fjac of subroutine FCN should be changed from OUT to IN OUT. As of now, when the subroutine is entered with iflag = 1, fjac becomes undefined; when entered with iflag = another value, fvec becomes undefined.

This subtle difference matters when flags such as NAG's -C=undefined or FTN95's /undef are used.

certik commented 2 years ago

I transferred this issue to https://github.com/fortran-lang/minpack/issues/21.