[Boost-bugs] [Boost C++ Libraries] #5704: geometric_distribution::min() returns wrong value

Subject: [Boost-bugs] [Boost C++ Libraries] #5704: geometric_distribution::min() returns wrong value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-17 05:26:51


#5704: geometric_distribution::min() returns wrong value
-------------------------------------------+--------------------------------
 Reporter: bolero.murakami+cpp@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
-------------------------------------------+--------------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5704>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC