I have an 84+ with 2.55MP, with no shells installed. I generated some random digits, and I was surprised to find they were all 0. Since randInt( uses the same routines as rand, I called rand several times and
obtained the same value each time: 7.636845417602 * 10^-8.

This was easily fixed by seeding rand, but what was the most probable cause?

In addition, is there a value that one can seed rand with to break the RNG and replicate this behavior?
Here are some seeds that will generate first a first value close to zero. I have not tested to see whether or not they will break rand.


Code:
1141809  0.00000002034438
2283618  0.00000004068875
3425427  0.00000006103313
4567236  0.00000008137751
49041133  0.00000000043894
50182942  0.00000002311162
51324751  0.00000003833384
52466560  0.00000006100652
53608369  0.00000007622862
54750178  0.00000009890118
98082266  0.00000000087789
99224075  0.00000001610010
100365884  0.00000004622325
101507693  0.00000006144546
102649502  0.00000007666767
147123399  0.00000000131695
148265208  0.00000001653916
149407017  0.00000003176137
150548826  0.00000004698313
151690635  0.00000007710651
196164532  0.00000000175578
197306341  0.00000000207683
198448150  0.00000003220021
199589959  0.00000003252126
200731768  0.00000009244650
245205665  0.00000000219461
246347474  0.00000000251566
247489283  0.00000003263904
248631092  0.00000003296009
249772901  0.00000006308346
250914710  0.00000009320684
252056519  0.00000009352789
294246798  0.00000000263390
295388607  0.00000000295495
296530416  0.00000003307832
297672225  0.00000006320170
298814034  0.00000006352275
299955843  0.00000009364521
301097652  0.00000009396626
343287931  0.00000000307318
344429740  0.00000003319656
345571549  0.00000003351761
346713358  0.00000006364007
347855167  0.00000006396112
348996976  0.00000009408450
392329064  0.00000000351156
394612682  0.00000000415366
395754491  0.00000003427704
396896300  0.00000006440041
398038109  0.00000009452378
399179918  0.00000006504251
400321727  0.00000009516589
442512006  0.00000000427099
443653815  0.00000003439527
444795624  0.00000006451774
445937433  0.00000003503737
447079242  0.00000006515984
448221051  0.00000009528412
490411330  0.00000000438922
492694948  0.00000000503132
493836757  0.00000003515561
494978566  0.00000006527807
496120375  0.00000009540236
497262184  0.00000006592018
498403993  0.00000009604264
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement