diff options
-rw-r--r-- | rational.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.py b/rational.py index 34b298f..f99f610 100644 --- a/rational.py +++ b/rational.py @@ -113,7 +113,7 @@ class Rational: def __div__(self, rval): if isinstance(rval, Rational): - ret = Rational(self.d * rval.d, self.n * rval.n) + ret = Rational(self.n * rval.d, self.d * rval.n) elif type(rval) is types.IntType or type(rval) is types.LongType: ret = Rational(self.n, self.d * rval) else: |