From bd1a3cbf13b9c3bd8a5674d034edf53c6737aecd Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Wed, 27 Mar 2024 11:48:57 +1100 Subject: [PATCH] Fix bug in conversion. --- Math/gfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Math/gfp.h b/Math/gfp.h index 43bfb542..313c74fb 100644 --- a/Math/gfp.h +++ b/Math/gfp.h @@ -350,7 +350,7 @@ void to_signed_bigint(bigint& ans, const T& x) { ans = x; // get sign and abs(x) - if (ans > T::get_ZpD().pr_half) + if (ans >= T::get_ZpD().pr_half) ans -= T::pr(); }