summaryrefslogtreecommitdiff
path: root/src/theory/arith/arith_rewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/arith/arith_rewriter.cpp')
-rw-r--r--src/theory/arith/arith_rewriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp
index 6dd6ffd56..86e5b3195 100644
--- a/src/theory/arith/arith_rewriter.cpp
+++ b/src/theory/arith/arith_rewriter.cpp
@@ -742,8 +742,10 @@ RewriteResponse ArithRewriter::rewriteIntsDivModTotal(TNode t, bool pre){
// (mod x (- c)) ---> (mod x c)
NodeManager* nm = NodeManager::currentNM();
Node nn = nm->mkNode(k, t[0], nm->mkConst(-t[1].getConst<Rational>()));
- Node ret = k == kind::INTS_DIVISION ? nm->mkNode(kind::UMINUS, nn) : nn;
- return RewriteResponse(REWRITE_AGAIN, nn);
+ Node ret = (k == kind::INTS_DIVISION || k == kind::INTS_DIVISION_TOTAL)
+ ? nm->mkNode(kind::UMINUS, nn)
+ : nn;
+ return RewriteResponse(REWRITE_AGAIN, ret);
}else if(dIsConstant && n.getKind() == kind::CONST_RATIONAL){
Assert(d.getConst<Rational>().isIntegral());
Assert(n.getConst<Rational>().isIntegral());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback