Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6069 closed Bugs (fixed)

binomial_distribution seems to throw when it shouldn't

Reported by: Jordan DeLong <delong.j@…> 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 !

Change History (2)

comment:1 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [75168]) Allow precision.hpp to work with number types in base 10. Fix binomial_distribution quantile when success_fraction is 1. Fixes #6069.

comment:2 by Jordan DeLong <delong.j@…>, 11 years ago

Thanks! :)

Note: See TracTickets for help on using tickets.