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

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

Brian Broker  wrote:

>Earlier I wrote (in response to Rett):
>
>>random_atom = rand( #FFFF )
>>
>>I will get a result between #00000001 and #0000FFFF which is clearly a 16-
>>bit random number that excludes the possibility of getting a result of
>>#0000.
>
>I also meant to say that because of the above reasoning, the program you
>wrote would not meet the input criteria for DieHard...
>
>-- Brian

You are absolutely right and one would think that I could count to eight by
now in my career. What is really strange, is that I edited the ASCII set of
numbers generated by rand(#FFFF) and they looked completely random
and 32 bit. They also tested to be fairly decently random in the Diehard
test. Go figure. Mr. Craig, why is this so? It is obvious that something is
going on here that doesn't quite meet the eye.

Also, when rereading the doc for rand(), it doesn't say that 32 bit rands can't
be generated. It says that when an integer is used as range, an integer will
be generated for output. It also says that this function can be applied to
an atom or to all the elements of a sequence. I presume that when applied
to an atom, an atom will be the result with concomitant range. I will alter the
test and see what happens.

Everett L.(Rett) Williams
rett at gvtc.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu