#6069 closed Bugs (fixed)
binomial_distribution seems to throw when it shouldn't
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | math |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | binomial_distribution | Cc: |
Description
The following raises an exception, but from the documentation it appears that it should be a valid call:
quantile(binomial_distribution<double>(10, 1), 1.0f - (0.0001f)));
The exception says:
Error in function boost::math::cdf(binomial_distribution<d> const&, d): Number of Successes argument is -nan, but must be >= 0 !
Note:
See TracTickets
for help on using tickets.
(In [75168]) Allow precision.hpp to work with number types in base 10. Fix binomial_distribution quantile when success_fraction is 1. Fixes #6069.