diff --git a/estimator/prob.py b/estimator/prob.py index 3ffca9e..0f16f9c 100644 --- a/estimator/prob.py +++ b/estimator/prob.py @@ -124,5 +124,8 @@ def amplify_sigma(target_advantage, sigma, q): sigma = sum(sigma_**2 for sigma_ in sigma).sqrt() except TypeError: pass + if sigma > q: + return oo + advantage = float(exp(-float(pi) * (float(sigma / q) ** 2))) return amplify(target_advantage, advantage, majority=True)