Kaydet (Commit) 650c1c9d authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Minor beautification

üst a32c4d05
...@@ -606,11 +606,11 @@ class Random(_random.Random): ...@@ -606,11 +606,11 @@ class Random(_random.Random):
# This version due to Janne Sinkkonen, and matches all the std # This version due to Janne Sinkkonen, and matches all the std
# texts (e.g., Knuth Vol 2 Ed 3 pg 134 "the beta distribution"). # texts (e.g., Knuth Vol 2 Ed 3 pg 134 "the beta distribution").
y = self.gammavariate(alpha, 1.) y = self.gammavariate(alpha, 1.0)
if y == 0: if y == 0:
return 0.0 return 0.0
else: else:
return y / (y + self.gammavariate(beta, 1.)) return y / (y + self.gammavariate(beta, 1.0))
## -------------------- Pareto -------------------- ## -------------------- Pareto --------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment