PRNG Analysis

bash


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

#!/bin/bash

N=1000000
X=10
BATCH_SIZE=10000
OUTPUT_FILE="batch_bash${X}_${N}"

# Generate N random numbers between 1 and X
nums=()
while (( ${#nums[@]} <= N )); do
  batch=()
  for ((i=0; i<BATCH_SIZE; i++)); do
    batch+=($RANDOM)
  done
  for ((i=0; i<BATCH_SIZE; i++)); do
    num=$((1 + (batch[i] * X) / 32767))
    nums+=($num)
  done
done

# Write output to file
echo "${nums[@]}" > "$OUTPUT_FILE"