I deleted the last post i made cause it didn't compress.. This formula compresses 57% after 40 loops
Code: Select all
screen 19
dim as longint v1
dim as string n , c
do
randomize
dim as longint n1 = int( rnd * 65536 )
v1 = n1 \ 256
n = str(frac(n1/256))
n = mid(n,3)
n = left(n,2)
print
print n1
' try to recreate n1 , using only v1 and n
for b as longint = 0 to 65535 step 1
c = str(frac(b/256))
c = mid(c,3)
c = left(c,2)
if b \ 256 = v1 and c = n then print b : exit for
next
sleep
loop until inkey = chr(27)
sleep
end