Skip to content

Commit 648a3d8

Browse files
will-cerndpiparo
authored andcommitted
fix 6thorder+exponential interpolation if nominal is not equal to 1
1 parent 6f94d14 commit 648a3d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roofit/roofitcore/inc/RooFit/Detail/MathFuncs.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,12 @@ inline double flexibleInterpSingle(unsigned int code, double low, double high, d
278278
// interpolate 6th degree exp
279279
double x0 = boundary;
280280

281+
high /= nominal;
282+
low /= nominal;
283+
281284
// GHL: Swagato's suggestions
282-
double powUp = std::pow(high / nominal, x0);
283-
double powDown = std::pow(low / nominal, x0);
285+
double powUp = std::pow(high, x0);
286+
double powDown = std::pow(low, x0);
284287
double logHi = std::log(high);
285288
double logLo = std::log(low);
286289
double powUpLog = high <= 0.0 ? 0.0 : powUp * logHi;

0 commit comments

Comments
 (0)