From 580faa72aa47b0792dd0a2c3775d6d03a0fad371 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 9 Jan 2020 17:10:33 +0000 Subject: [PATCH] Fix FPA rounding mode for FP string numerals. Fixes #2851. --- src/api/api_numeral.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/api_numeral.cpp b/src/api/api_numeral.cpp index 837e1dc24..c736c92f9 100644 --- a/src/api/api_numeral.cpp +++ b/src/api/api_numeral.cpp @@ -82,7 +82,7 @@ extern "C" { // avoid expanding floats into huge rationals. fpa_util & fu = mk_c(c)->fpautil(); scoped_mpf t(fu.fm()); - fu.fm().set(t, fu.get_ebits(_ty), fu.get_sbits(_ty), MPF_ROUND_TOWARD_ZERO, n); + fu.fm().set(t, fu.get_ebits(_ty), fu.get_sbits(_ty), MPF_ROUND_NEAREST_TEVEN, n); a = fu.mk_value(t); mk_c(c)->save_ast_trail(a); }