Re: RNG Test: Code to generate Diehard file in Euphoria
- Posted by Joel Crook <joel at MAIL.K-A.COM> Feb 17, 2000
- 752 views
--=====================_13980362==_.ALT At 08:10 PM 02/16/2000 -0500, you wrote: >On Mon, 14 Feb 2000 16:44:09 -0800, Joel Crook <joel at MAIL.K-A.COM> wrote: > >>I have the Diehard results for anyone thats interested. Revised code to >>create the hex source file is included below. And some day I'll get this language figured out. Euphoria is NOT easier to code as advertised. I'm used to pascal conventions where there are exactly two types of read and write statements not C styled incoherance. Euphoria seems to be a cross between "wanna-don't-wanna be" C and TCL without TK and almost C and TCL/TK with the addition of David Cuny's Win32lib. I believe the TCL/TK expr command does support 32 bit bitwise operators. Sorry... Just frustrated.... ...and Everett L.(Rett) Williams was earlier kind enough to reply: >rett at gvtc.com> >With this slight modification to your code for performance and proper output, >I was able to run the diehard test with the #FFFF key for rand(). The results >appeared to be pretty darn good, with some tests at both ends of the range >and many close to the middle....that is, if I understand what the results mean. >From what I see, rand should be sufficient for almost any normal purpose. >If you are really determined, you could send off for Mr. Masaglia's CDROM >with it't 60 sets of 10,000,000 random integers. By the way, the program >took about 42 seconds to generate 49,201,152 bytes. Yes the RNG appears to be good for everyday purposes BUT p=.500000 for all tests is the optimum. Consistant scores of p>=.9000 or p<=.10000 are not good. If the end objective of using the rand() function REQUIRES uniformly generated random numbers the results I saw did not indicate Euphoria passed all of the tests. Maybe RDS might like to weigh in and state the source and/or type of RNG that is coded into Euphoria. Joel H. Crook Manager, Information Services Certified Novell Administrator Microsoft Certified Professional, OS Specialist Kellogg & Andelson Accountancy Corp. 14724 Ventura Blvd. 2nd Floor Sherman Oaks, CA 91403 (818) 971-5100 --=====================_13980362==_.ALT <html> <dl> <dd>At 08:10 PM 02/16/2000 -0500, you wrote: <dd>>On Mon, 14 Feb 2000 16:44:09 -0800, Joel Crook <joel at MAIL.K-A.COM> wrote: <dd>> <dd>>>I have the Diehard results for anyone thats interested. Revised code to <dd>>>create the hex source file is included below.<br> <br> </dl>And some day I'll get this language figured out. <br> <br> Euphoria is NOT easier to code as advertised. I'm used to pascal conventions where there are exactly two types of read and write statements not C styled incoherance. <br> <br> Euphoria seems to be a cross between "wanna-don't-wanna be" C and TCL without TK and almost C and TCL/TK with the addition of David Cuny's Win32lib. I believe the TCL/TK expr command does support 32 bit bitwise operators. Sorry... Just frustrated....<br> <br> ...and Everett L.(Rett) Williams was earlier kind enough to reply:<br> <dl> <dd>>rett at gvtc.com> <dd>>With this slight modification to your code for performance and proper output, <dd>>I was able to run the diehard test with the #FFFF key for rand(). The results <dd>>appeared to be pretty darn good, with some tests at both ends of the range <dd>>and many close to the middle....that is, if I understand what the results mean. <dd>>From what I see, rand should be sufficient for almost any normal purpose. <dd>>If you are really determined, you could send off for Mr. Masaglia's CDROM <dd>>with it't 60 sets of 10,000,000 random integers. By the way, the program <dd>>took about 42 seconds to generate 49,201,152 bytes.<br> <br> </dl>Yes the RNG appears to be good for everyday purposes BUT p=.500000 for all tests is the optimum. Consistant scores of p>=.9000 or p<=.10000 are not good. If the end objective of using the rand() function REQUIRES uniformly generated random numbers the results I saw did not indicate Euphoria passed all of the tests. <br> <br> Maybe RDS might like to weigh in and state the source and/or type of RNG that is coded into Euphoria.<br> <br> <br> <br> <br> Joel H. Crook<br> <br> Manager, Information Services<br> <font size=1>Certified Novell Administrator<br> Microsoft Certified Professional, OS Specialist<br> <br> </font><b>Kellogg & Andelson Accountancy Corp.<br> </b><font size=1>14724 Ventura Blvd. 2nd Floor<br> Sherman Oaks, CA 91403<br> (818) 971-5100<br> </font></html> --=====================_13980362==_.ALT--