What is the default value of MaxFunctionCalls()

Dear experts

I wonder what is the number of MaxFunctionCalls() in ROOT::Math::Minimizer and should I set it manually?

std::cout << MaxFunctionCalls() << std::endl;

https://root.cern.ch/doc/master/classROOT_1_1Math_1_1Minimizer.html#aabbadaa76bb5723fcaec0eb7d40850b2

This will return 0 and in the source code it says “Remain default” but I don’t know what number is the “default”

@moneta

Thank you for pointing to some experts! And in addition I wonder what is the default value of ROOT::Math::Minimizer::Precision(), maybe some experts can point me to some page that explains every default value.

Any suggestions…?

Keep this topic alive…

Did you try with:

MinimizerOptions::Print(cout) ?

This also returns 0 for maxFuncCall, and -1 for precision.

OK, I found it in the source code of ROOT::Math::Minuit2Minimizer::Minimize():

  492      int maxfcn_used = maxfcn;
  493      if (maxfcn_used == 0) {
  494         int nvar = fState.VariableParameters();
  495         maxfcn_used = 200 + 100 * nvar + 5 * nvar * nvar;
  496      }

Thanks for finding out!

I opened: [skip-ci][nfc][math] Improve docu wrt max function calls in Minuit2 by ferdymercury · Pull Request #18656 · root-project/root · GitHub
to improve the HTML documentation