Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rational.py
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2012-03-20 14:25:09 (GMT)
committer Gary Martin <gary@garycmartin.com>2012-03-20 14:25:09 (GMT)
commit2690934c0fc7c20b72884307e3759ec71ec1fdc8 (patch)
tree49445e9b7e844385487e52b65d02188123ea8b4d /rational.py
parenta79902984148144a5a16bc85d85f6f9321566d21 (diff)
Fix error in Rational division SL#3363 (Miguel Garcia)
Diffstat (limited to 'rational.py')
-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: