diff options
Diffstat (limited to 'src/theory/arith/delta_rational.h')
-rw-r--r-- | src/theory/arith/delta_rational.h | 12 |
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){ |