The statement “implicit none” forbids implicit typing of variables, but not
implicit procedure declaration. The new “implicit none (type, external)” syntax
forbids both, and is thus safer.
If solved function returns complex values (with nonzero imaginary part), turn
them into NaNs. This mimics the behaviour of the use_dll case.
Next step will be to adapt the trust region algorithm to diminish radius when
there are NaNs.
Incidentally, bump the required GCC version to 9, since we use the %re and %im
components of complex values in Fortran.