renaming seed to correct name
This commit is contained in:
parent
70f0a20f35
commit
f7725eb347
|
@ -2,13 +2,13 @@ from time import time_ns
|
||||||
n = 3 #max random number will be (2^n)
|
n = 3 #max random number will be (2^n)
|
||||||
|
|
||||||
def randomNumber(maxN):
|
def randomNumber(maxN):
|
||||||
num = time_ns()
|
allen = time_ns()
|
||||||
num = int(format(num, '0127b'), base=2)
|
allen = int(format(allen, '0127b'), base=2)
|
||||||
array=[]
|
array=[]
|
||||||
for i in range(16000):
|
for i in range(16000):
|
||||||
array.append(num & 1)
|
array.append(allen & 1)
|
||||||
new = (num ^ (num >> 1) ^ (num >> 2)^(num >> 7)) & 1
|
new = (allen ^ (allen >> 1) ^ (allen >> 2)^(allen >> 7)) & 1
|
||||||
num = (num >> 1) | (new << 127)
|
allen = (allen >> 1) | (new << 127)
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user