- if (right_min_complement < tools::min_value<Real>())
- right_min_complement = tools::min_value<Real>();
- auto u = [&](Real z, Real zc)->Real
+ if (right_min_complement < min_complement_limit)
+ right_min_complement = min_complement_limit;
+ //
+ // These asserts will fail only if rounding errors on
+ // type Real have accumulated so much error that it's
+ // broken our internal logic. Should that prove to be
+ // a persistent issue, we might need to add a bit of fudge
+ // factor to move left_min_complement and right_min_complement
+ // further from the end points of the range.
+ //
+ BOOST_ASSERT((left_min_complement * diff + a) > a);
+ BOOST_ASSERT((b - right_min_complement * diff) < b);
+ auto u = [&](Real z, Real zc)->result_type