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: Thu, 01 Nov 2012 21:09:57 +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 #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-11-01 21:09:57 UTC ---
Author: paolo
Date: Thu Nov 1 21:09:51 2012
New Revision: 193070
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193070
Log:
2012-11-01 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:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/bits/random.h
branches/gcc-4_7-branch/libstdc++-v3/include/bits/random.tcc