From c01062e93b6a396673c150faff3c10541b4d6dd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:16:34 +0000 Subject: [PATCH] Revert "Fix set_big_i64/set_big_ui64 zero handling: zero is always represented as small" Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --- src/util/mpz.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/util/mpz.h b/src/util/mpz.h index f6ed99689..e74da812a 100644 --- a/src/util/mpz.h +++ b/src/util/mpz.h @@ -605,11 +605,7 @@ public: void set(mpz & a, unsigned val) { set(a, (uint64_t)val); } void set(mpz & a, int64_t val) { - if (val == 0) { - // Zero is always represented as small - reset(a); - } - else if (mpz::fits_in_small(val) && is_small(a)) { + if (mpz::fits_in_small(val) && is_small(a)) { a.set(val); } else { @@ -618,11 +614,7 @@ public: } void set(mpz & a, uint64_t val) { - if (val == 0) { - // Zero is always represented as small - reset(a); - } - else if (mpz::fits_in_small(val) && is_small(a)) { + if (mpz::fits_in_small(val) && is_small(a)) { a.set(static_cast(val)); } else {