From 771c67f4ea3db0465c956c082af4e8b5a1a51b92 Mon Sep 17 00:00:00 2001 From: Joe Rowell Date: Thu, 29 Dec 2022 17:25:46 +0000 Subject: [PATCH] fix for upstream bug #500 Forwarded: https://github.com/fplll/fplll/issues/500 Gbp-Pq: Name upstream_fix_500.patch --- tests/test_babai.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_babai.cpp b/tests/test_babai.cpp index 9031cef..c4f99a3 100644 --- a/tests/test_babai.cpp +++ b/tests/test_babai.cpp @@ -68,8 +68,9 @@ int test_intrel(long n, long bits, bool shouldfail = false, int seed = 0) } else { - std::cerr << "n:" << n << ", bits: " << bits << std::endl; - std::cerr << w << std::endl; + std::cerr << "n:" << n << ", bits: " << bits << ", shouldfail:" << shouldfail << std::endl; + std::cerr << "t:" << t << std::endl; + std::cerr << "w:" << w << std::endl; return 1; } } @@ -83,8 +84,13 @@ int main(int argc, char *argv[]) status += test_intrel(10, 40); status += test_intrel(10, 50); status += test_intrel(10, 60, true); - status += test_intrel(10, 60); + #ifdef FPLLL_WITH_LONG_DOUBLE + // Some platforms have sizeof(double) == sizeof(long double) + // because long double is only required to be at least as large + // as a double. This means the behaviour of the first test + // depends on the platform. + status += test_intrel(10, 60, sizeof(double) == sizeof(long double)); status += test_intrel(10, 70, true); #endif #ifdef FPLLL_WITH_QD -- 2.30.2