[gcc r17-2581] libstdc++: Use 2 * epsilon step for piecewise_constant_distribution tests.

Tomasz Kaminski via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <20260721104736.B472D4BA2E05__7810.37136200524$1784630868$gmane$org@sourceware.org>
https://gcc.gnu.org/g:5e914c4f75743dab1ad31718e1dc846d5f6fe284

commit r17-2581-g5e914c4f75743dab1ad31718e1dc846d5f6fe284
Author: Tomasz Kamiński <[email protected]>
Date:   Tue Jul 21 12:42:18 2026 +0200

    libstdc++: Use 2 * epsilon step for piecewise_constant_distribution tests.
    
    This is required to pass test on powerpc64le-unknown-linux-gnu, and
    was already the case for piecewise_linear_distribution.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/26_numerics/random/piecewise_constant_distribution/operators/accessors.cc
            (test_precision_depended): Define step as 2 * epsilon().

Diff:
---
 .../random/piecewise_constant_distribution/operators/accessors.cc       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/accessors.cc b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/accessors.cc
index 15fb68217497..b31b028dc27d 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/accessors.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/piecewise_constant_distribution/operators/accessors.cc
@@ -50,7 +50,7 @@ test_precision_depended()
 
   std::initializer_list<DistType> x{0.0, 0.5, 1.0};
   constexpr InputType step
-    = std::numeric_limits<InputType>::epsilon();
+    = std::numeric_limits<InputType>::epsilon() * 2;
   InputType wt[2]{InputType(1) - step, InputType(1) + step};
 
   using Distribution = std::piecewise_constant_distribution<DistType>;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.