Re: RNG Test: Code to generate Diehard file in Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

I have the Diehard results for anyone thats interested. Revised code to
create the hex source file is included below.

revised code:

--randout.txt
--creates a file for use with the Diehard Tests
--(c)1999 Joel Hunter Crook
--free for non-commercial use

include file.e

atom file_number, output1, output2 -- ,final
sequence file_name , final
file_name="rndout.txt"
file_number=open(file_name,"w")
for i=1 to 150000 do
       for j=1 to 20 do
            final={}


                output1=rand(#FFFF) -- 4 bytes
                output2=rand(#FFFF) -- 4 bytes
                final&=output1&output2


-- final now equals 80 bytes or 640 bits

        printf(file_number,"%x",final)
        end for -- j
final&="\n \r"
end for -- i
close(file_number)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu