Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rational.py2
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: