From 6fa8c51f72ada5e467f5e3b9552ab22ef68dcfd3 Mon Sep 17 00:00:00 2001 From: Edward Smith-Rowland Date: Mon, 7 May 2018 16:59:08 +0000 Subject: [PATCH] Moar PR libstdc++/80506 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index 6db900cc0cd..f398150d416 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -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))))); -- 2.30.2