#5703 closed Bugs (invalid)
geometric_distribution::min() returns wrong value
Reported by: | anonymous | 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.
Change History (2)
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Note:
See TracTickets
for help on using tickets.
sorry posted twice