summaryrefslogtreecommitdiff
path: root/lulua/report.py
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-02-29 09:24:00 +0100
committerLars-Dominik Braun <lars@6xq.net>2020-02-29 09:24:47 +0100
commit3f9f918c93a92350c76a761af85abf003737fc30 (patch)
tree3b96772a05413bef80775cd95176f05469eca0ac /lulua/report.py
parent102fd5aafa4f36572ae9f1d8083e058b0f47676c (diff)
downloadlulua-3f9f918c93a92350c76a761af85abf003737fc30.tar.gz
lulua-3f9f918c93a92350c76a761af85abf003737fc30.tar.bz2
lulua-3f9f918c93a92350c76a761af85abf003737fc30.zip
Fix function approx and its testcase
Function was moved and changed by commit 0f8643954fd9507aec85bab46046e71a497bfffe, but the testcase was not.
Diffstat (limited to 'lulua/report.py')
-rw-r--r--lulua/report.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lulua/report.py b/lulua/report.py
index 200bb9b..b6c6f7e 100644
--- a/lulua/report.py
+++ b/lulua/report.py
@@ -14,7 +14,7 @@ def approx (i):
units = ['', 'thousand', 'million', 'billion']
base = Decimal (1000)
i = Decimal (i)
- while i >= base and len (units) > 1:
+ while round (i, 1) >= base and len (units) > 1:
i /= base
units.pop (0)
return round (i, 1), units[0]