added missing line to default binom_conf_interval for n=0 case
authorForrest Voight <forrest.voight@gmail.com>
Fri, 17 Feb 2012 15:22:25 +0000 (10:22 -0500)
committerForrest Voight <forrest.voight@gmail.com>
Fri, 17 Feb 2012 15:22:25 +0000 (10:22 -0500)
p2pool/util/math.py

index 392b0b7..de47dcc 100644 (file)
@@ -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