Skip to content

Commit

Permalink
Fix the rand_limits test for 32-bit longs
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin D. Howard <gavin@gavinhoward.com>
  • Loading branch information
gavinhoward committed May 23, 2023
1 parent fc813cc commit 6cc4384
Show file tree
Hide file tree
Showing 2 changed files with 383 additions and 14 deletions.
286 changes: 272 additions & 14 deletions tests/bc/rand_limits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,283 @@ seed = 12183415694832323910165063565742029266.78201143488173352403523006\
17939450703787369504276248076613097826033345478457018711188931947\
5643844725709641352295875549316406250

for (i = 1; i <= 37; ++i)
{
irand(10^i)
if (maxrand() >= 2^64 - 1) {

for (i = 1; i <= 37; ++i)
{
irand(10^i)
}

1
77
914
8200
44887
866441
2358358
13559535
416767986
9276295152
89383616490
954770306600
8117340260822
90441255304792
123091484400148
673234816385761
33144762500773628
741775860680476044
4715856253932519349
44722685516799788803
691627564627043533689
3601367765145373281202
27535154823004408648947
51478009115008961612866
4031778740698066425486191
95653217339584215257144674
426302455455598639876532628
1216686741117783240797844143
17705719185928989853748208134
784851648926334033332776172502
3120413811981279690501349408357
38214388551463331616358091659583
720453131307667144268209805308554
8939221360785849706894139937864130
10262211588802126422696984407808741
267283013443362846268603285132432016
2034014520976339794036584994364919660
}
else {

5
15
701
8215
98794
602366
2027255
74687524
830825144
6081336208
24314055735
838559932276
6866719060925
36806875401211
406827598340727
5356006452532004
38220052834497507
337361587138720056
1181974760686154481
16008532535003488966
951908092544652236970
90730737551380302703
46492092840194767743061
188697840939074129889664
3963332393372745718515074
78044317381361304314479194
257814131633376797403093774
5383100889234097635148206308
39812361752905775691804497289
222434065196674291290714932718
4942298796724199168854529657788
30804146383811856719866376789543
817977187096950760817419359822004
922359768927341898905002631901715
84002847212517205019842390182209654
423700247670879534125867432896848815
982360002329187383971171836321012954

for (i = 1; i <= 37; ++i)
{
irand(10^i)
}
}

seed = 12183415694832323910165063565742029266.82951754507405817776622978\
09630984098584076072986006731059784797092101840727292180396879039\
9608224106486886739730834960937500000
09630984098584076072986006731059784797092101840727292180396879039\
9608224106486886739730834960937500000

if (maxrand() >= 2^64 - 1) {

for (i = 1; i <= 37; ++i)
{
irand(10^i)
}

9
84
802
9765
80115
246589
4463508
85992729
977135
4189279533
68755431294
107950335674
9675253977558
87867459318681
801765066192715
2162649050595056
2892195376814570
134060417012729962
7176764836888537721
5273685153052366176
461774434438273613889
152344588818260411506
11709967193759556155964
533206453770793013516792
2511508581949736433569969
1573162243991468106989339
215826582488545888127004159
1480805837640270183994742134
61049958584446767740466194227
145231395106326027295263107581
7023255505921253691380349839502
48606431941187693512006850149822
87214859605659588002413450479944
7949773868584392220935704452065706
4544031206641768922348422844031232
37285268346623956247142903563298469
696722030777467416877847444483018982
}
else {

9
73
468
1781
79556
166610
9336284
96403025
23318279
1074901232
30659049590
125915951725
3123436435684
52610031172756
445020218860038
87520306151384
47213087211849485
154045322058555704
9488624282418036451
12849313140308039019
828063328914872193931
2956454855398834052902
87417046449320418408586
165187095179884370295407
3602892678245454556711806
88079064510429999588220544
376741359503002189591164726
56633499559885161310029862
11172900796387700171428233596
473873806840427957175182603343
824290276873152640168308384248
36092351141101218267245025967581
39973475177812910298579659860850
7364670182480566996610562443888661
51592684301602944329896812066058114
951444349069518195584787848316744461
3234933598293500107173129970384252570

for (i = 1; i <= 37; ++i)
{
irand(10^i)
}
}

seed = 149423560533592712773538909996244073918.2952752612544959208642520\
06505634103779572918483064082477106507620297186161725006312917321\
53815843275879160501062870025634765625

if (maxrand() >= 2^64 - 1) {

for (i = 1; i <= 37; ++i)
{
irand(10^i)
}

for (i = 1; i <= 37; ++i)
{
irand(10^i)
0
94
825
907
62512
633399
3539412
65712557
329618801
9052319971
50117657456
719515050973
396081658001
98762199564287
537857673363391
5701380917944903
16144997029797264
918603142053856533
4437053492025674148
76125560050255946142
262504846798815931770
688599520356200914010
77509440962809216890090
889672321539369676198789
5795540531885308263478299
88374255397211092706329509
118231692173643319720953958
6218036129497143746927154520
3236727278542723274070894570
72098882691751515204435662053
8305331942254135876823981226459
33980292322856768815329277766669
154632353482145519952015208333866
192400848794451940507964192401413
69666401739718540927805290639731997
545814355378177567662640611917018958
4986776343571879972263664198494529846
}
else {

seed = 149423560533592712773538909996244073918.29527526125449592086425200650563\
410377957291848306408247710650762029718616172500631291732153815843275879\
160501062870025634765625
6
47
709
350
45155
117711
6147313
26359748
56878412
930721373
47052494689
84216331603
1874946867051
30417072907659
157776263741438
3325742508233965
39500653878059614
278676289794009775
3342139004245631096
63313724143310202591
647891168358497623537
5925769871143510986759
3051401096746445704645
761857520743586046415633
9077595326394996332524977
2159936754163773508122732
426809670586105698135317225
3294516277260755029991322796
14749983115477586453985047494
692100641365100970093726483540
9502478720578852594268790479747
9062487417784678956874793130476
352159971921852073191742323073689
2270803770328639487517517910897872
35166631277333300065883628523569361
596441689792333324819903835359197616
6933582360405829608479430394981956723

for (i = 1; i <= 37; ++i)
{
irand(10^i)
for (i = 1; i <= 37; ++i)
{
irand(10^i)
}
}

0 comments on commit 6cc4384

Please sign in to comment.