re PR libstdc++/55047 (operator() in std::exponential_distribution may call log(0))
commitc2d9083df222456f5d0f15d5a6ceca7a97ded8b9
authorHaakan Younes <hyounes@google.com>
Wed, 24 Oct 2012 12:20:19 +0000 (24 12:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 24 Oct 2012 12:20:19 +0000 (24 12:20 +0000)
tree0c8ee68c0703de1fab83e2d0e6acb422847fc01e
parentc6c084858c967229e5366b7e1ee45820e7e3ba4d
re PR libstdc++/55047 (operator() in std::exponential_distribution may call log(0))

2012-10-24   Haakan Younes  <hyounes@google.com>
     Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/55047
* include/bits/random.h (exponential_distribution<>::operator):
Fix formula to std::log(result_type(1) - __aurng()).
* include/bits/random.tcc: Likewise, everywhere.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r192762
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/include/bits/random.tcc