random.h (negative_binomial_distribution<>:: negative_binomial_distribution(_IntType...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 24 Mar 2011 16:49:19 +0000 (16:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 24 Mar 2011 16:49:19 +0000 (16:49 +0000)
commit113b21bdaf45d2b80d1585b4b2c9cb20395667be
tree910868d6c7c42cdefee69efc97a8e2516cb71df2
parent67295642aaa617fe2419ab877e66aa280fb32802
random.h (negative_binomial_distribution<>:: negative_binomial_distribution(_IntType, double), [...]): Fix construction of _M_gd.

2011-03-24  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/random.h (negative_binomial_distribution<>::
negative_binomial_distribution(_IntType, double),
negative_binomial_distribution<>::
negative_binomial_distribution(const param_type&)): Fix
construction of _M_gd.
* include/bits/random.tcc (negative_binomial_distribution<>::
operator()): Fix computation, per Leger's algorithm.
* testsuite/util/testsuite_random.h (discrete_pdf,
negative_binomial_pdf, poisson_pdf, uniform_int_pdf): New.
(binomial_pdf): Swap last two parameters.
* testsuite/26_numerics/random/discrete_distribution/
operators/values.cc: New.
* testsuite/26_numerics/random/negative_binomial_distribution/
operators/values.cc: Likewise.
* testsuite/26_numerics/random/poisson_distribution/
operators/values.cc: Likewise.
* testsuite/26_numerics/random/uniform_int_distribution/
operators/values.cc: Likewise.
* testsuite/26_numerics/random/binomial_distribution/
operators/values.cc: Adjust.

From-SVN: r171411
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/random.tcc
libstdc++-v3/testsuite/26_numerics/random/binomial_distribution/operators/values.cc
libstdc++-v3/testsuite/26_numerics/random/discrete_distribution/operators/values.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc [new file with mode: 0644]
libstdc++-v3/testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_random.h