Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mathlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mathlib.py b/mathlib.py
index d0fabc8..746df48 100644
--- a/mathlib.py
+++ b/mathlib.py
@@ -221,7 +221,7 @@ class MathLib:
elif type(n) is types.LongType:
n = self.d(n)
elif isinstance(n, Rational):
- n = self.d(float(n))
+ n = self.d(Decimal(n.n) / Decimal(n.d))
elif not isinstance(n, Decimal):
return _('Error: unsupported type')