PRNG Analysis

perl


347:0.001021
888:0.000979
155:0.000979
644:0.001027
235:0.000958
678:0.001008
243:0.001022
105:0.001009
930:0.001028
751:0.001011
865:0.001058
992:0.000999
558:0.00096
812:0.000979
987:0.001039
616:0.001043
508:0.000997
7:0.001019
701:0.00101
251:0.001083
461:0.001031
533:0.000942
545:0.000973
483:0.000998
201:0.000971
2:0.000995
131:0.000992
626:0.001053
494:0.000976
148:0.001025
743:0.001033
174:0.001027
735:0.001008
822:0.000984
662:0.001005
615:0.000998
550:0.001012
16:0.000993
58:0.001015
941:0.000953
43:0.001007
500:0.001053
837:0.000984
524:0.000965
866:0.001013
267:0.000931
880:0.000979
85:0.000976
457:0.000964
381:0.000973
236:0.000943
106:0.001049
363:0.001022
156:0.000983
670:0.001014
80:0.001003
938:0.001044
407:0.001007
903:0.00099
169:0.001038
589:0.000989
767:0.000952
140:0.001018
514:0.000958
736:0.000952
439:0.001033
953:0.000974
625:0.001037
859:0.000977
809:0.000987
546:0.001021
838:0.001015
90:0.001019
980:0.000967
95:0.000976
285:0.000992
937:0.001058
408:0.001009
966:0.000968
369:0.000961
695:0.000971
841:0.000973
458:0.001055
268:0.001001
340:0.000971
356:0.000951
909:0.000994
583:0.000965
163:0.00104
181:0.000964
561:0.001035
306:0.001002
768:0.001011
445:0.001029
433:0.000993
959:0.000985
853:0.001009
803:0.001008
594:0.00099
785:0.000998
36:0.000979
696:0.001002
400:0.000957
53:0.000973
374:0.000994
424:0.00102
677:0.001045
249:0.000943
965:0.001032
912:0.000994
887:0.000989
260:0.00097
348:0.000985
450:0.000964
48:0.001011
892:0.000945
286:0.000974
331:0.001061
507:0.000996
830:0.001031
272:0.000958
988:0.000959
557:0.000972
74:0.001018
786:0.001017
772:0.000975
539:0.00099
922:0.000933
489:0.001063
24:0.000979
414:0.000961
305:0.000987
446:0.00098
147:0.000994
749:0.001014
355:0.001009
760:0.000954
84:0.000984
447:0.000999
730:0.000923
146:0.001002
628:0.000939
792:0.000989
189:0.001045
569:0.001013
787:0.000995
540:0.001058
114:0.000943
951:0.000979
9:0.000999
901:0.001043
287:0.001015
860:0.001048
361:0.000972
292:0.001
849:0.00099
618:0.00103
506:0.000984
383:0.000956
556:0.001048
682:0.000944
697:0.000946
150:0.001016
18:0.001004
56:0.001009
676:0.001087
394:0.00098
100:0.001028
872:0.000954
230:0.001045
943:0.000973
124:0.000979
935:0.000967
886:0.000967
741:0.001039
548:0.001031
33:0.001012
574:0.000965
357:0.000904
481:0.001061
133:0.001038
145:0.001019
203:0.001024
654:0.000936
463:0.000998
604:0.001059
253:0.000967
738:0.001025
620:0.00101
307:0.001028
531:0.00098
885:0.001054
936:0.001004
703:0.001
158:0.000987
967:0.001062
753:0.000968
238:0.000974
675:0.001012
108:0.000979
339:0.000991
241:0.001027
868:0.001023
610:0.000996
555:0.000973
505:0.00098
70:0.001009
547:0.001041
780:0.001014
75:0.000996
308:0.000937
766:0.000949
737:0.000998
209:0.000972
139:0.001001
259:0.000973
469:0.000994
358:0.001007
440:0.001008
456:0.001037
266:0.000986
107:0.000972
237:0.000994
709:0.000994
968:0.001
157:0.001001
759:0.001055
406:0.001023
345:0.000963
690:0.000935
333:0.001005
20:0.001047
13:0.001026
632:0.000974
985:0.001002
836:0.001035
867:0.001026
25:0.000911
280:0.000965
46:0.00099
801:0.000927
8:0.001014
627:0.001037
300:0.001003
474:0.00098
324:0.001002
712:0.000984
448:0.000976
765:0.000944
194:0.001001
851:0.000975
350:0.000987
38:0.001009
222:0.001034
563:0.000977
183:0.00101
431:0.001014
581:0.000958
161:0.000951
94:0.001029
788:0.000998
972:0.001003
722:0.000989
835:0.001047
986:0.001
843:0.001055
389:0.00102
617:0.000982
314:0.001006
288:0.000949
405:0.001023
346:0.001007
960:0.000995
212:0.001045
698:0.000919
455:0.001055
949:0.001029
265:0.000952
648:0.000973
819:0.000972
999:0.000994
273:0.001018
884:0.001007
126:0.000973
377:0.001048
427:0.000989
396:0.000986
82:0.000955
674:0.000966
554:0.001025
631:0.001023
913:0.001047
893:0.001009
520:0.001069
504:0.001045
81:0.000998
99:0.000962
417:0.000972
829:0.00099
116:0.001006
575:0.000986
655:0.001026
510:0.000974
144:0.000969
498:0.001035
773:0.000976
923:0.000978
605:0.001024
178:0.000998
528:0.001031
721:0.000997
971:0.000994
395:0.001014
640:0.000947
211:0.000982
669:0.001008
934:0.000996
125:0.000984
606:0.000999
518:0.001037
852:0.000964
490:0.001014
711:0.001045
656:0.001007
170:0.001008
802:0.000964
115:0.00098
66:0.001
576:0.001014
597:0.000977
162:0.001098
582:0.001004
432:0.000971
221:0.001
834:0.000974
527:0.000977
315:0.000995
362:0.000978
291:0.000993
420:0.000936
871:0.001015
663:0.001038
370:0.001026
404:0.000985
264:0.000966
454:0.000993
681:0.001024
325:0.000998
475:0.001032
195:0.000986
764:0.001029
517:0.001038
902:0.001025
952:0.001022
598:0.001017
410:0.001073
791:0.001018
993:0.000969
279:0.001011
428:0.000993
813:0.001019
378:0.00104
344:0.000977
647:0.001016
316:0.000997
92:0.001058
77:0.000997
899:0.000962
919:0.000993
984:0.000985
242:0.000988
27:0.000948
590:0.000995
418:0.000999
823:0.000986
742:0.001006
929:0.001024
177:0.001023
532:0.001042
779:0.001034
196:0.001005
476:0.000996
482:0.00097
89:0.000969
326:0.000993
497:0.000992
91:0.000976
650:0.001033
515:0.000897
68:0.001038
176:0.001041
223:0.001009
197:0.001037
562:0.000969
182:0.000937
799:0.000996
87:0.001006
624:0.001066
477:0.001016
496:0.001041
327:0.000942
600:0.001023
29:0.001005
118:0.000973
713:0.001026
570:0.001039
79:0.001005
614:0.001038
317:0.000995
689:0.001044
525:0.000969
879:0.00098
213:0.001014
398:0.000932
842:0.001086
973:0.00102
299:0.000976
723:0.000981
128:0.001025
646:0.001033
110:0.001007
544:0.001044
921:0.001016
771:0.001003
578:0.000976
658:0.001022
495:0.000982
734:0.001049
608:0.001042
516:0.001058
175:0.000989
645:0.001035
891:0.000976
154:0.000978
633:0.000989
911:0.001029
390:0.000968
120:0.000995
104:0.001007
234:0.001013
864:0.000994
526:0.00096
271:0.001001
332:0.001049
577:0.000992
132:0.001038
202:0.000976
63:0.001018
596:0.000992
415:0.001013
462:0.001004
252:0.001023
320:0.001014
607:0.00101
821:0.000996
470:0.000959
304:0.001035
190:0.00107
354:0.001035
657:0.000952
639:0.001008
425:0.00102
375:0.001022
964:0.001063
702:0.00097
811:0.000989
991:0.001018
310:0.001058
752:0.000995
328:0.000953
478:0.000974
793:0.000932
229:0.000997
21:0.001028
444:0.00093
198:0.000975
72:0.001015
97:0.000991
416:0.001054
784:0.000924
595:0.00096
117:0.001025
719:0.00094
22:0.001048
683:0.000965
284:0.000942
942:0.001021
318:0.001048
219:0.000975
661:0.000952
873:0.001009
729:0.001059
293:0.001028
127:0.000993
979:0.001014
376:0.000992
694:0.001074
71:0.001015
382:0.000962
397:0.001005
426:0.000978
989:0.001011
503:0.001035
914:0.000933
151:0.001002
894:0.000987
231:0.000995
101:0.000966
1:0.000983
372:0.001019
553:0.000999
422:0.001036
386:0.001061
248:0.000991
360:0.001005
861:0.000994
755:0.001027
673:0.001021
349:0.000992
883:0.001021
946:0.000952
274:0.000931
705:0.001015
255:0.000963
748:0.00098
465:0.001026
98:0.001013
950:0.000999
412:0.000986
541:0.000987
900:0.000977
774:0.000994
143:0.001035
205:0.000978
135:0.001023
924:0.001011
34:0.001029
488:0.001021
731:0.000978
538:0.000992
368:0.001015
240:0.001034
706:0.000982
933:0.000994
459:0.001012
611:0.001037
269:0.001046
945:0.000999
409:0.000972
756:0.000986
76:0.000998
385:0.001035
839:0.00094
480:0.000982
45:0.00097
26:0.001085
857:0.001028
530:0.000986
40:0.001038
807:0.000995
621:0.001006
740:0.000994
206:0.001037
136:0.000993
769:0.001007
592:0.000999
167:0.001044
587:0.001076
958:0.001009
83:0.000974
437:0.00104
908:0.000974
256:0.001027
466:0.001051
263:0.001009
522:0.001017
453:0.000996
939:0.000987
664:0.001027
336:0.000989
403:0.00101
367:0.001052
281:0.000994
845:0.001005
691:0.001001
833:0.001015
808:0.00101
93:0.001046
565:0.001041
185:0.000969
858:0.000989
441:0.000979
512:0.001041
438:0.001008
907:0.001
763:0.000972
957:0.001009
168:0.001007
588:0.000962
781:0.000997
846:0.001004
983:0.001018
509:0.001059
961:0.001012
14:0.000967
559:0.000988
642:0.000999
679:0.00105
335:0.001014
343:0.000961
889:0.001001
994:0.000938
247:0.000975
814:0.001009
50:0.000956
430:0.000956
55:0.000956
160:0.001022
580:0.000989
747:0.000883
149:0.001058
172:0.000985
537:0.000934
301:0.001005
3:0.000984
800:0.000971
824:0.00104
67:0.001012
566:0.000991
186:0.001043
351:0.000989
487:0.001039
850:0.000948
492:0.001001
88:0.000996
69:0.001008
714:0.001049
536:0.001007
192:0.000992
789:0.001011
187:0.001027
567:0.001002
472:0.00101
322:0.00095
486:0.000999
460:0.001009
28:0.000972
250:0.000974
623:0.00096
449:0.000977
955:0.000966
224:0.000999
905:0.000964
130:0.00099
746:0.000969
200:0.001002
750:0.000941
78:0.000974
365:0.000998
699:0.00098
312:0.00101
948:0.001009
974:0.000959
724:0.001003
246:0.001002
700:0.001018
44:0.00103
388:0.001048
847:0.000991
214:0.001045
289:0.000963
931:0.000993
613:0.001036
733:0.000986
258:0.00099
745:0.001013
468:0.001029
359:0.000973
906:0.000977
309:0.001043
956:0.001011
208:0.001061
138:0.000984
485:0.000972
96:0.000979
141:0.001043
543:0.000968
535:0.001011
380:0.000984
35:0.001088
881:0.00096
671:0.000971
863:0.001005
30:0.000927
245:0.000987
969:0.001053
103:0.001013
758:0.000981
233:0.000994
940:0.000985
551:0.001017
501:0.001044
337:0.001045
5:0.000987
153:0.000956
366:0.000994
708:0.000998
634:0.001004
572:0.001034
137:0.00099
207:0.001024
739:0.001011
166:0.001016
586:0.001062
353:0.00105
436:0.000992
303:0.000951
467:0.000981
86:0.000989
257:0.001015
856:0.000971
602:0.001038
23:0.001003
10:0.000988
15:0.000987
180:0.001024
560:0.001039
806:0.00096
549:0.000987
652:0.000996
73:0.000983
869:0.000974
341:0.000998
840:0.001004
239:0.00106
707:0.001011
963:0.001012
109:0.001061
338:0.00099
981:0.00096
54:0.000988
757:0.001053
159:0.000981
805:0.001007
783:0.001017
568:0.000968
188:0.000998
855:0.001055
761:0.001068
435:0.000973
443:0.001026
629:0.000982
585:0.001044
61:0.000984
794:0.000988
165:0.000952
112:0.001013
831:0.000995
693:0.001003
330:0.000973
947:0.001008
294:0.000993
401:0.001013
4:0.001052
874:0.000977
62:0.000942
283:0.001008
122:0.000992
684:0.001008
848:0.000983
619:0.001005
451:0.001025
387:0.000986
392:0.000978
261:0.000945
898:0.001015
342:0.000971
918:0.000957
216:0.00099
726:0.001012
976:0.000996
997:0.000986
41:0.00099
244:0.000937
817:0.000951
982:0.000939
635:0.000947
278:0.000959
429:0.000992
643:0.001001
379:0.000984
226:0.000994
744:0.000988
173:0.001016
928:0.001043
778:0.000935
493:0.000989
571:0.000974
419:0.00099
651:0.00099
484:0.001004
37:0.000979
534:0.001051
716:0.000985
6:0.001021
827:0.001045
601:0.000957
42:0.000968
667:0.001022
636:0.000971
364:0.000965
59:0.001044
832:0.001011
270:0.001048
725:0.000965
975:0.000985
262:0.00097
391:0.00098
910:0.000995
890:0.001048
452:0.000967
523:0.000975
215:0.001078
121:0.001009
402:0.001023
762:0.001039
599:0.000968
715:0.000985
954:0.001008
111:0.001044
513:0.00103
770:0.00102
920:0.001029
904:0.001012
225:0.000982
311:0.001049
990:0.000981
810:0.001005
295:0.001007
668:0.000967
932:0.000982
529:0.001104
875:0.000999
51:0.000959
685:0.00098
593:0.001016
820:0.001015
321:0.00103
471:0.000985
804:0.001036
191:0.000993
854:0.000976
434:0.000998
52:0.000946
519:0.00103
795:0.001007
584:0.000982
164:0.001011
17:0.000981
686:0.001068
672:0.001029
876:0.000972
49:0.001008
882:0.000927
917:0.001001
897:0.000998
296:0.000978
502:0.000985
277:0.001013
818:0.001037
423:0.001022
649:0.001001
552:0.000952
998:0.000944
660:0.001039
373:0.001055
796:0.001039
777:0.000964
179:0.000983
927:0.000982
499:0.000994
828:0.00102
413:0.001021
142:0.000987
64:0.00094
442:0.000988
511:0.000976
718:0.001061
113:0.001027
797:0.001032
199:0.001005
782:0.000987
926:0.00102
31:0.001028
776:0.000999
329:0.000984
1000:0.001031
479:0.001003
228:0.001002
282:0.000997
944:0.001056
123:0.001023
297:0.00109
276:0.000979
521:0.000999
630:0.001001
393:0.000977
728:0.000961
978:0.000972
687:0.000981
319:0.000985
692:0.001036
218:0.001007
384:0.000987
19:0.001008
47:0.000982
877:0.001037
896:0.001052
916:0.001008
32:0.000989
464:0.000983
254:0.001028
603:0.001042
925:0.001033
134:0.001007
204:0.000981
653:0.000969
775:0.000989
220:0.000972
491:0.000997
352:0.000992
710:0.000996
573:0.000938
171:0.00102
302:0.001007
895:0.001036
641:0.001032
915:0.001013
210:0.001067
962:0.000982
754:0.001015
638:0.000989
704:0.001021
275:0.001024
970:0.001003
720:0.001047
609:0.00104
411:0.000991
659:0.00095
542:0.001019
790:0.000941
825:0.000934
732:0.000983
579:0.000995
60:0.001019
421:0.00102
102:0.001011
371:0.001005
870:0.001021
232:0.001056
152:0.001058
680:0.000996
65:0.000972
57:0.000951
334:0.000951
666:0.000982
637:0.001006
815:0.000975
995:0.000999
862:0.001019
290:0.000965
622:0.00103
12:0.001022
717:0.001001
119:0.001034
39:0.001038
184:0.000981
564:0.001019
826:0.000946
227:0.001026
193:0.000946
323:0.000974
591:0.000959
473:0.001014
798:0.00101
977:0.000973
129:0.001005
727:0.001014
816:0.000944
996:0.000925
399:0.001012
612:0.000997
298:0.000972
11:0.001029
665:0.000996
313:0.000977
878:0.001033
217:0.001009
844:0.001011
688:0.000989
3:0.099794
8:0.100089
4:0.09964
9:0.099764
2:0.1004
6:0.099863
1:0.100108
7:0.100065
10:0.100103
5:0.100174
1:0.099980724
9:0.100003025
4:0.099977003
3:0.100013137
2:0.100020644
10:0.100006636
6:0.100009438
8:0.100001052
7:0.099995261
5:0.09999308

#!/usr/bin/env perl

# Set the number of random numbers to generate and the upper bound for the numbers
my $n = 1000000000;
my $x = 10;

# Generate N random numbers between 1 and X
my @numbers = map { int(rand($x)) + 1 } (1..$n);

sleep(5);

# Calculate the probability of each number
my %counts;
$counts{$_}++ for @numbers;
my %probabilities = map { $_ => $counts{$_} / $n } keys %counts;

sleep(5);

# Generate a file name based on the values of N and X
my $file_name = "perl_$x\_$n";

# Create the "outputs" directory if it does not exist
# mkdir "outputs";

# Write the probabilities to a file in the "outputs" directory
open my $fh, ">", "../outputs/$file_name";
for my $number (keys %probabilities) {
    print $fh "$number:$probabilities{$number}\n";
}