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

2012-11-01 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047



Paolo Carlini  changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #5 from Paolo Carlini  2012-11-01 
21:11:02 UTC ---

Fixed mainline and 4.7.3.


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

2012-11-01 Thread paolo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047



--- Comment #4 from 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  

 Paolo Carlini  



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


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

2012-10-24 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047



--- Comment #3 from Paolo Carlini  2012-10-24 
12:21:17 UTC ---

Fixed in mainline. A similar fix will go in 4_7-branch in a few days.


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

2012-10-24 Thread paolo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047



--- Comment #2 from 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  

 Paolo Carlini  



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


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

2012-10-24 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55047



Paolo Carlini  changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-10-24

 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot

   |gnu.org |com

   Target Milestone|--- |4.7.3

 Ever Confirmed|0   |1



--- Comment #1 from Paolo Carlini  2012-10-24 
09:43:46 UTC ---

You are right, let's fix this asap in mainline and 4.7. I think it went that

the issue already existed many years ago when we integrated the contribution as

TR1 code and then we propagated it in more places :(