This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/55047] operator() in std::exponential_distribution may call log(0)
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 24 Oct 2012 12:20:32 +0000
- Subject: [Bug libstdc++/55047] operator() in std::exponential_distribution may call log(0)
- Auto-submitted: auto-generated
- References: <bug-55047-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-10-24 12:20:32 UTC ---
Author: paolo
Date: Wed Oct 24 12:20:19 2012
New Revision: 192762
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192762
Log:
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.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/random.h
trunk/libstdc++-v3/include/bits/random.tcc