[root] / trunk / math / mathmore / inc / Math / NumGradFunction.h Repository:
ViewVC logotype

Diff of /trunk/math/mathmore/inc/Math/NumGradFunction.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25485, Mon Sep 22 07:52:52 2008 UTC revision 25486, Mon Sep 22 12:43:03 2008 UTC
# Line 113  Line 113 
113    
114     // calculate derivative using mathcore derivator     // calculate derivative using mathcore derivator
115     double DoDerivative (const double * x, unsigned int icoord  ) const {     double DoDerivative (const double * x, unsigned int icoord  ) const {
116        static double step = 1.0E-8;        static double kEps = 1.E-6;
117          static double kPrecision = 1.E-8; // sqrt(epsilon)
118          double x0 = x[icoord];
119          double step = std::max( kEps* std::abs(x0), 8.0*kPrecision*(std::abs(x0) + kPrecision) );
120        return ROOT::Math::Derivator::Eval(*fFunc, x, icoord, step);        return ROOT::Math::Derivator::Eval(*fFunc, x, icoord, step);
121     }     }
122    

Legend:
Removed from v.25485  
changed lines
  Added in v.25486

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9