You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
The current _rand_exp is currently looking suboptimal:
# Exp2 generates n with probability 1/2^(n+1). @staticmethoddef_rand_exp():
rand_bin=bin(int(random.random() *2**32-1))[2:]
rand_bin='0'*(32-len(rand_bin)) +rand_bincount=0foriinrand_bin:
ifi=='0':
count+=1else:
breakreturncount
Am I misreading the code and the comment, or is it equivalent to int(random.expovariate(0.5))?
The text was updated successfully, but these errors were encountered:
_rand_exp generates a number from 0-32 I'm don't see how it's equivalent to int(random.expovariate(0.5)) but maybe I'm missing something. I also searched a better way to implement this when I ported this part from go-fuzz but didn't find anything "built-in"
The current
_rand_exp
is currently looking suboptimal:Am I misreading the code and the comment, or is it equivalent to
int(random.expovariate(0.5))
?The text was updated successfully, but these errors were encountered: