From ece691285efa35fce4534632418cc2305187146e Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Wed, 14 Jan 2026 07:17:13 -1000 Subject: [PATCH] throw an algebraic exception on a failure of m_limit.inc() instead of returning sign_zero Signed-off-by: Lev Nachmanson --- src/math/polynomial/algebraic_numbers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/polynomial/algebraic_numbers.cpp b/src/math/polynomial/algebraic_numbers.cpp index 4cdf9c4b8..7f6df1e20 100644 --- a/src/math/polynomial/algebraic_numbers.cpp +++ b/src/math/polynomial/algebraic_numbers.cpp @@ -1821,7 +1821,7 @@ namespace algebraic_numbers { } if (!m_limit.inc()) - return sign_zero; + throw algebraic_exception(m_limit.get_cancel_msg()); // make sure that intervals of a and b have the same magnitude int a_m = magnitude(a_lower, a_upper);