]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Moar PR libstdc++/80506
authorEdward Smith-Rowland <emsr@gcc.gnu.org>
Mon, 7 May 2018 16:59:08 +0000 (16:59 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Mon, 7 May 2018 16:59:08 +0000 (16:59 +0000)
2018-05-07  Edward Smith-Rowland  <3dw4rd@verizon.net>

Moar PR libstdc++/80506
* include/bits/random.tcc (gamma_distribution::__generate_impl()):
Fix magic number used in loop condition.

Actually put the file in.
Don't know what my problem is today...

From-SVN: r260008

libstdc++-v3/include/bits/random.tcc

index 6db900cc0cd94fa31289f3354d4d5af3755cbc6f..f398150d41605bad62c8b0c75f2f1feaec89450f 100644 (file)
@@ -2408,7 +2408,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                  __v = __v * __v * __v;
                  __u = __aurng();
                }
-             while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+             while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n
                     && (std::log(__u) > (0.5 * __n * __n + __a1
                                          * (1.0 - __v + std::log(__v)))));
 
@@ -2429,7 +2429,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                  __v = __v * __v * __v;
                  __u = __aurng();
                }
-             while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n
+             while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n
                     && (std::log(__u) > (0.5 * __n * __n + __a1
                                          * (1.0 - __v + std::log(__v)))));