help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] gsl: round-off error?


From: C Mclean
Subject: [Help-gsl] gsl: round-off error?
Date: Wed, 14 Mar 2007 13:21:15 +0000

Dear Reader,

 Using the ROOT::Math::Integrator class within Fitting code, to
perform Toy MC studies I continuously get the following error message:

gsl: qag.c:248: ERROR: roundoff error prevents tolerance from being achieved
Default GSL error handler invoked.
Abort (core dumped)

I understand this is the result of setting my absolute and relative
tolerances to be too stringent; this is shown below:

 double abs_tol  = 1.E-9; //<- absolute tolerance
 double rel_tol  = 1.E-7; //<- relative tolerance

  ROOT::Math::Integrator::GSLFuncPointer ff = &pTimeResODD;

  ROOT::Math::Integrator * nminteg = new
ROOT::Math::Integrator(ff,ROOT::Math::Integration::ADAPTIVE, abs_tol,
rel_tol, 1000 );

  //--method for integration
  nminteg->SetIntegrationRule(ROOT::Math::Integration::GAUSS21);

//--range [a,b]
  double result =  nminteg->Integral(ff,pms,tmin,tmax);

I know if I set abs_tol and rel_tol to be 1E-3, then I don't obtain the
round-off errors. However, if I do this, my code returns 'lossy' fit
result for  for my parameters.

 My question is therefore this. Is there any way I can modify/use the
code 'snippet' above to keep relatively stringent tolerance values (and
thus retain good fitting results), or is there anyway of 'automating'
the tolerance values in my code to be as 'optimally' stringent as
possible, without occurring the error messages?

 One further question. Is there any ROOT experts at CERN who could
help me on this. I ask this since Im currently at CERN at the moment.


 Kindest Regards,


 Colin Mclean.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]