Opened 11 years ago
Closed 11 years ago
#5704 closed Bugs (fixed)
geometric_distribution::min() returns wrong value
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | random |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
geometric_distribution::min() returns always 1. (boost 1.47)
I think, this is a wrong value. Should return 0.
In fact, boost::random::geometric_distribution::operator()(Engine) is sometimes returns 0.
The boost::random::geometric_distribution class has been updated to match the C++ standard.
Boost 1.46.1 : p(i) = (1-p)p(i-1)
Boost 1.47 : p(i) = p(1-p)i
If the previous specification, then it should return 1.
However, the current specification, should return 0.
Note:
See TracTickets
for help on using tickets.
(In [74168]) geometric_distribution::min should be 0. Fixes #5704.