re PR libstdc++/48114 ([C++0x] binomial_distribution incorrect for p > .5 and geometr...
authorAndrey Zholos <aaz@althenia.net>
Mon, 14 Mar 2011 17:57:48 +0000 (17:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 14 Mar 2011 17:57:48 +0000 (17:57 +0000)
commitd8d4db3345ec3271a5edf4bd84e999662cd8e2e2
tree252af3acb8afb7f38157c3d59aadf4acfdef3cd4
parent7edc478cef220dd4fa0dbe3a50c1030abac83ec1
re PR libstdc++/48114 ([C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition)

2011-03-14  Andrey Zholos  <aaz@althenia.net>

PR libstdc++/48114
* include/bits/random.h (geometric_distribution): Correct formula
in comment, per C++0x.
(geometric_distribution<>::param_type::param_type(double)): Fix check.
(geometric_distribution<>::param_type::_M_initialize):
Store log(1 - p).
* include/bits/random.tcc (geometric_distribution<>::operator()):
Fix computation.
(binomial_distribution<>::operator()): Likewise.

From-SVN: r170946
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/random.tcc