git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5ca5a69
)
added missing line to default binom_conf_interval for n=0 case
author
Forrest Voight
<forrest.voight@gmail.com>
Fri, 17 Feb 2012 15:22:25 +0000 (10:22 -0500)
committer
Forrest Voight
<forrest.voight@gmail.com>
Fri, 17 Feb 2012 15:22:25 +0000 (10:22 -0500)
p2pool/util/math.py
patch
|
blob
|
history
diff --git
a/p2pool/util/math.py
b/p2pool/util/math.py
index
392b0b7
..
de47dcc
100644
(file)
--- a/
p2pool/util/math.py
+++ b/
p2pool/util/math.py
@@
-123,6
+123,7
@@
except ImportError:
assert 0 <= x <= n and 0 <= conf < 1
if n == 0:
left = random.random()*(1 - conf)
+ return left, left + conf
# approximate - Wilson score interval
z = math.sqrt(2)*ierf(conf)
p = x/n