summaryrefslogtreecommitdiff
path: root/src/theory/arith/delta_rational.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/arith/delta_rational.h')
-rw-r--r--src/theory/arith/delta_rational.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/theory/arith/delta_rational.h b/src/theory/arith/delta_rational.h
index a46dde1cf..12110fab4 100644
--- a/src/theory/arith/delta_rational.h
+++ b/src/theory/arith/delta_rational.h
@@ -55,14 +55,18 @@ public:
}
int sgn() const {
- int x = getNoninfinitesimalPart().sgn();
- if(x == 0){
- return getInfinitesimalPart().sgn();
+ int s = getNoninfinitesimalPart().sgn();
+ if(s == 0){
+ return infinitesimalSgn();
}else{
- return x;
+ return s;
}
}
+ int infinitesimalSgn() const {
+ return getInfinitesimalPart().sgn();
+ }
+
int cmp(const DeltaRational& other) const{
int cmp = c.cmp(other.c);
if(cmp == 0){
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback