Hi all,
I’m currently trying to minimize a function whose return value is the result of TF2::Integral().
After several calls of the target function, it gives the following ERROR:
Error in <ROOT::Math::AdaptiveIntegratorMultiDim::DoIntegral()>: Logic error: idvax0 < 1!
The Code is something like this:
double func(const double *x){
...
TF2 *f...;
...
return f->Integral(a1,b1,a2,b2);
}
ROOT::Math::Minimizer *miniChi = ROOT::Math::Factory::CreateMinimizer("Minuit2","Migrad");
ROOT::Math::Functor f(&func, NumOfPar );
miniChi->SetFunction(f);
...
miniChi->Minimize()
...
I found that in the source file of TF2::Integral(), there is a statement of:
...
if (idvax0 < 1) {
// Can happen for overflows / degenerate floats.
idvax0 = 1;
::Error("AdaptiveIntegratorMultiDim::DoIntegral()", "Logic error: idvax0 < 1!");
}
...
I don’t really understand the overflow/degenerate floats error here.
Is it because TF2::Integral() is using the data type of float while the function need better precision such as a variable of double type? Any idea?
Cheers!
Jinnan
ROOT Version: 6.18.00
Platform: Ubuntu 18.04.01
Compiler: gcc 7.4.0