fixed ierf
authorForrest Voight <forrest@forre.st>
Tue, 24 Jan 2012 22:49:23 +0000 (17:49 -0500)
committerForrest Voight <forrest@forre.st>
Tue, 24 Jan 2012 22:49:23 +0000 (17:49 -0500)
p2pool/util/math.py

index b87e963..6b152d9 100644 (file)
@@ -104,7 +104,7 @@ def find_root(y_over_dy, start, steps=10, bounds=(None, None)):
     return guess
 
 def ierf(z):
-    return find_root(lambda x: (erf(x) - z)/(2*math.e**(-guess**2)/math.sqrt(math.pi)), 0)
+    return find_root(lambda x: (erf(x) - z)/(2*math.e**(-x**2)/math.sqrt(math.pi)), 0)
 
 try:
     from scipy import special