From 1ace3d0cf3f1a0f1c1c4a39a581674ebe7fa5306 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 12 Sep 2024 10:37:19 -0700 Subject: [PATCH] fix #7372 Signed-off-by: Nikolaj Bjorner --- src/sat/sat_config.cpp | 1 + src/util/gparams.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sat/sat_config.cpp b/src/sat/sat_config.cpp index 73516f66d..ac9a68878 100644 --- a/src/sat/sat_config.cpp +++ b/src/sat/sat_config.cpp @@ -158,6 +158,7 @@ namespace sat { m_lookahead_delta_fraction = p.lookahead_delta_fraction(); m_lookahead_use_learned = p.lookahead_use_learned(); if (m_lookahead_delta_fraction < 0 || m_lookahead_delta_fraction > 1.0) { + verbose_stream() << m_lookahead_delta_fraction << "\n"; throw sat_param_exception("invalid value for delta fraction. It should be a number in the interval 0 to 1"); } diff --git a/src/util/gparams.cpp b/src/util/gparams.cpp index 839d02ab0..171cae604 100644 --- a/src/util/gparams.cpp +++ b/src/util/gparams.cpp @@ -22,6 +22,7 @@ Notes: #include "util/mutex.h" #include "util/region.h" #include "util/map.h" +#include "util/rational.h" static DECLARE_MUTEX(gparams_mux); @@ -351,8 +352,8 @@ public: ps.set_uint(param_name, static_cast(val)); } else if (k == CPK_DOUBLE) { - char * aux; - double val = strtod(value, &aux); + rational r(value); + double val = r.get_double(); ps.set_double(param_name, val); } else if (k == CPK_BOOL) {