From c98585d9913878cfe5328fe98fb4357f911b29b0 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Thu, 6 Feb 2020 19:12:29 -0600 Subject: Fix exact sqrt (#3721) Co-authored-by: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com> --- src/theory/arith/nl_model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/theory/arith') diff --git a/src/theory/arith/nl_model.cpp b/src/theory/arith/nl_model.cpp index eff810522..54ae4c52a 100644 --- a/src/theory/arith/nl_model.cpp +++ b/src/theory/arith/nl_model.cpp @@ -1200,8 +1200,8 @@ bool NlModel::getApproximateSqrt(Node c, Node& l, Node& u, unsigned iter) const Rational curr_sq = curr * curr; if (curr_sq == rc) { - rl = curr_sq; - ru = curr_sq; + rl = curr; + ru = curr; break; } else if (curr_sq < rc) -- cgit v1.2.3