[Bug libstdc++/55047] operator() in std::exponential_distribution may call log(0)

paolo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 24 12:20:00 GMT 2012


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



More information about the Gcc-bugs mailing list