Skip to content

Commit

Permalink
Fix detection of non strictly increasing CDF
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmure committed Apr 12, 2024
1 parent caa14a0 commit 93f1404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/Uncertainty/Model/DistributionImplementation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@ Scalar DistributionImplementation::computeScalarQuantile(const Scalar prob,
LOGDEBUG(OSS() << "root=" << root);

// special case non strictly increasing CDF: retain the inf of the interval veryfing F(x)=p
if (computeCDF(root - quantileEpsilon_) == prob)
if (root > quantileEpsilon_ && computeCDF(root - quantileEpsilon_) == prob)
{
solver.setResidualError(0.5 * cdfEpsilon_);
root = solver.solve(f, p - cdfEpsilon_, leftTau, root, leftCDF, prob);
Expand Down

0 comments on commit 93f1404

Please sign in to comment.