Skip to content

Commit e315b38

Browse files
authored
Fix error
1 parent dd833b9 commit e315b38

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/random.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -837,13 +837,13 @@ def binomialvariate(self, n=1, p=0.5):
837837
return x
838838
while True:
839839
try:
840-
y += _floor(_log2(random()) / c) + 1
840+
y += _floor(_log2(random()) / c) + 1
841841
except ValueError:
842842
# fix random() rethrn 0.0 option
843-
continue
844-
if y > n:
845-
return x
846-
x += 1
843+
continue
844+
if y > n:
845+
return x
846+
x += 1
847847

848848
# BTRS: Transformed rejection with squeeze method by Wolfgang Hörmann
849849
# https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.47.8407&rep=rep1&type=pdf

0 commit comments

Comments
 (0)