RNG Diehard results for Eu 'rand'
- Posted by Brian Broker <bkb at CNW.COM> Feb 14, 2000
- 569 views
I generated 3 sets of results from the numbers generated by the following code: ---------------------------------------- integer noshift, shifted, concat atom rn, rn2 -- random #'s not shifted -- noshift = open( "noshift.txt", "w" ) for i = 1 to 400000 do for j = 1 to 10 do -- random # from 1 to #3FFFFFFF rn = rand( #3FFFFFFF ) printf( noshift, "%08x", { rn } ) end for puts( noshift, "\n" ) end for close( noshift ) ---------------------------------------- -- random #'s shifted -- shifted = open( "shifted.txt", "w" ) for i = 1 to 400000 do for j = 1 to 10 do -- random # from 4 to #FFFFFFFC rn = rand( #3FFFFFFF ) * 4 printf( shifted, "%08x", { rn } ) end for puts( shifted, "\n" ) end for close( shifted ) ---------------------------------------- -- 2 16-bit random #'s concatenated -- concat = open( "concat.txt", "w" ) for i = 1 to 400000 do for j = 1 to 10 do -- 2 16-bit #s from #0000 to #FFFF rn = rand( #10000 ) - 1 rn2 = rand( #10000 ) - 1 printf( concat, "%04x%04x", { rn, rn2 } ) end for puts( concat, "\n" ) end for close( concat ) ---------------------------------------- I do not have time to analyze the results at the moment (I didn't even read all of the documentation...) but you can download them from http://cnw.com/~bkb/results.zip The testing on the unshifted results ended prematurely for whatever reason and the overall results look the ugliest for these numbers... -- Brian