GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Simplify _rand_exp · Issue #7 · fuzzitdev/pythonfuzz
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
Simplify _rand_exp #7Copy link Copy link Open DescriptionThe current # Exp2 generates n with probability 1/2^(n+1). @staticmethod def _rand_exp(): rand_bin = bin(int(random.random() * 2**32-1))[2:] rand_bin = '0'*(32 - len(rand_bin)) + rand_bin count = 0 for i in rand_bin: if i == '0': count +=1 else: break return count Am I misreading the code and the comment, or is it equivalent to Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |