CALL FCN (NPAR,GRAD,FVAL,XVAL,IFLAG,FUTIL)
Note that when Minuit is being used through an intermediate package such as HBOOK or PAW, then the FCN may be supplied by the this package.
The name of the subroutine may be chosen freely (in documentation we give it the generic name FCN) and must be declared EXTERNAL in the user's program which calls Minuit (in data-driven mode) or calls Minuit subroutines (in Fortran-callable mode). The meaning of the parameters XVAL is of course defined by the user, who uses the values of those parameters to calculate his function value. The starting values must be specified by the user (either by supplying parameter definitions from a file, or typing them at the terminal, in data-driven mode; or by calling subroutine MNPARM in Fortran-callable mode), and later values are determined by Minuit as it searches for the minimum or performs whatever analysis is requested by the user. FUTIL represents the name of a function or subroutine which may be defined and supplied by the user and called from FCN. If the user does not use the FUTIL feature, the last argument may be given as zero, but if used, the name of FUTIL must be declared EXTERNAL and a subprogram of that name must be supplied at loading time. It is possible, by giving them different names, to analyze several different FCNs in one job. However, one analysis must be completed before the next is started. In order to avoid interference between the analyses of two different FCNs, the user should call Minuit (in data-driven mode) or MNINIT (in Fortran-callable mode) each time a new FCN is to be studied.