From: Morgan Deters Date: Tue, 28 Aug 2012 17:14:59 +0000 (+0000) Subject: fix a bug in CLN rational printing where the base was ignored (was causing the new... X-Git-Tag: cvc5-1.0.0~7836 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b75096dde1f691e14e0300acfb8ea648e7331b2a;p=cvc5.git fix a bug in CLN rational printing where the base was ignored (was causing the new CVC3-compatibility-API system test to fail) --- diff --git a/src/util/rational_cln_imp.h b/src/util/rational_cln_imp.h index 969a8b5eb..4247a1e63 100644 --- a/src/util/rational_cln_imp.h +++ b/src/util/rational_cln_imp.h @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include @@ -299,8 +301,11 @@ public: /** Returns a string representing the rational in the given base. */ std::string toString(int base = 10) const { + cln::cl_print_flags flags; + flags.rational_base = base; + flags.rational_readably = false; std::stringstream ss; - fprint(ss, d_value); + print_rational(ss, flags, d_value); return ss.str(); }