This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/63176] std::generate_canonical<float, std::numeric_limits<float>::digits>() generates 1.0f


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63176

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Aug 26 21:27:09 2015
New Revision: 227233

URL: https://gcc.gnu.org/viewcvs?rev=227233&root=gcc&view=rev
Log:
Ensure std::generate_canonical doesn't return 1.

2015-08-26  Edward Smith-Rowland  <3dw4rd@verizon.net>
            Jonathan Wakely  <jwakely@redhat.com>

        PR libstdc++/64351
        PR libstdc++/63176
        * include/bits/random.tcc (generate_canonical): Loop until we get a
        result less than one.
        * testsuite/26_numerics/random/uniform_real_distribution/operators/
        64351.cc: New.

Added:
   
trunk/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/64351.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/random.tcc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]