[commit: ghc] master: Correctly round when calculating the deviation (10f3d39)
git at git.haskell.org
git at git.haskell.org
Thu Jul 17 11:03:24 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/10f3d396492742902d183a503c1bcb145d28df7f/ghc
>---------------------------------------------------------------
commit 10f3d396492742902d183a503c1bcb145d28df7f
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Jul 17 13:03:09 2014 +0200
Correctly round when calculating the deviation
>---------------------------------------------------------------
10f3d396492742902d183a503c1bcb145d28df7f
testsuite/driver/testlib.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 091a1ea..126c8e4 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1045,7 +1045,7 @@ def checkStats(name, way, stats_file, range_fields):
lowerBound = trunc( expected * ((100 - float(dev))/100))
upperBound = trunc(0.5 + ceil(expected * ((100 + float(dev))/100)))
- deviation = round(((val * 100)/ expected) - 100, 1)
+ deviation = round(((float(val) * 100)/ expected) - 100, 1)
if val < lowerBound:
print field, 'value is too low:'
More information about the ghc-commits
mailing list