mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 21:08:46 +00:00
pretty print algebraic numbers from fast pretty printer
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
e36c2fec9e
commit
0b893afee4
|
@ -33,6 +33,8 @@ Revision History:
|
||||||
#include "ast/fpa_decl_plugin.h"
|
#include "ast/fpa_decl_plugin.h"
|
||||||
#include "ast/for_each_ast.h"
|
#include "ast/for_each_ast.h"
|
||||||
#include "ast/decl_collector.h"
|
#include "ast/decl_collector.h"
|
||||||
|
#include "math/polynomial/algebraic_numbers.h"
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
// smt_renaming
|
// smt_renaming
|
||||||
|
@ -372,6 +374,12 @@ class smt_printer {
|
||||||
display_rational(val, is_int);
|
display_rational(val, is_int);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (m_autil.is_irrational_algebraic_numeral(n)) {
|
||||||
|
anum const & aval = m_autil.to_irrational_algebraic_numeral(n);
|
||||||
|
std::ostringstream buffer;
|
||||||
|
m_autil.am().display_root_smt2(buffer, aval);
|
||||||
|
m_out << buffer.str();
|
||||||
|
}
|
||||||
else if (m_sutil.str.is_string(n, s)) {
|
else if (m_sutil.str.is_string(n, s)) {
|
||||||
std::string encs = s.encode();
|
std::string encs = s.encode();
|
||||||
m_out << "\"";
|
m_out << "\"";
|
||||||
|
|
Loading…
Reference in a new issue