Opened 11 years ago

Closed 11 years ago

#6805 closed Bugs (fixed)

Infinite loop in do_inverse_discrete_quantile(...)

Reported by: torsten.hilgenberg@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.49.0 Severity: Problem
Keywords: distributions discrete quantiles Cc:

Description

#include <boost/math/distributions/binomial.hpp>
using boost::math::binomial_distribution;
using boost::math::policies::policy;
using boost::math::policies::discrete_quantile;
		
binomial_distribution<double, policy<discrete_quantile<boost::math::policies::integer_round_up> > > 
distribution(100, 1e-10);
		
quantile(distribution, 0.99999999);

This goes into boost\math\distributions\detail\inv_discrete_quantile.hpp's do_inverse_discrete_quantile with guess < 10 and never comes back.

Change History (2)

comment:1 by John Maddock, 11 years ago

Investigating...

comment:2 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [78090]) Add checks to discrete quantile finder to handle cases where there is no true answer. Fixes #6805.

Note: See TracTickets for help on using tickets.