mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
fix nex simplification
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
9f8f6dee9e
commit
f07d9a80c5
4 changed files with 24 additions and 10 deletions
|
@ -141,10 +141,18 @@ public:
|
|||
int& pow() { return m_power; }
|
||||
std::string to_string() const {
|
||||
std::stringstream s;
|
||||
if (pow() == 1) {
|
||||
s <<"(" << *e() << ")";
|
||||
if (pow() == 1) {
|
||||
if (e()->is_elementary()) {
|
||||
s << *e();
|
||||
} else {
|
||||
s <<"(" << *e() << ")";
|
||||
}
|
||||
} else {
|
||||
s << "(" << *e() << "^" << pow() << ")";
|
||||
if (e()->is_elementary()){
|
||||
s << "(" << *e() << "^" << pow() << ")";
|
||||
} else {
|
||||
s << "((" << *e() << ")^" << pow() << ")";
|
||||
}
|
||||
}
|
||||
return s.str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue