git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3581182
)
fixed improper efficiency rounding
author
Forrest Voight
<forrest@forre.st>
Mon, 6 Feb 2012 21:59:41 +0000 (16:59 -0500)
committer
Forrest Voight
<forrest@forre.st>
Mon, 6 Feb 2012 22:00:23 +0000 (17:00 -0500)
p2pool/util/math.py
patch
|
blob
|
history
diff --git
a/p2pool/util/math.py
b/p2pool/util/math.py
index
e08cb1f
..
50a279d
100644
(file)
--- a/
p2pool/util/math.py
+++ b/
p2pool/util/math.py
@@
-152,7
+152,7
@@
def format_binomial_conf(x, n, conf=0.95, f=lambda x: x):
if n == 0:
return '???'
left, right = minmax(map(f, binomial_conf_interval(x, n, conf)))
- return '~%.1f%% (%i-%i%%)' % (100*f(x/n), int(100*left), 100-int(100-100*right))
+ return '~%.1f%% (%.f-%.f%%)' % (100*f(x/n), left-1/2, right+1/2)
def reversed(x):
try: