You are not logged in.
Pages: 1
Hi,
I've been using the random numbers with preset links and I think the numbers being created are not as random as when the program is started manually (I mean, not through the preset link).
I don't know if it's important but I'm using it via pascal, With RandomRange. But even using the Randomize() once in each cycle or multiple times in a cycle, the result doesn't look to change a lot.
For example, for me it happens that numbers like 7,8,9,1 are very common but others as 3 or 5 are less likely to appear.
Is it possible that the randomness it's linked to any timer of ReNamer's time open?
If this software has helped you, consider getting your pro version. :)
Offline
Software generated random numbers are in 99% of the cases based on pseudo random number generators. Nevertheless, the randomness of the sequence would normally be pretty good.
Regarding the Randomize function, you must call it only once, at the start of the process. Below is the sample code which will replace filenames with random numbers in range 0..9 (both inclusive). Note that there was a mistake in the function description on Wiki in regards to the "inclusiveness".
var
Initialized: Boolean;
begin
if not Initialized then
begin
Randomize;
Initialized := True;
end;
FileName := IntToStr(RandomRange(0, 10)); // Actual range is [0..9]
end.
Offline
Yes, that's the way I'm using it, but... well, I don't know, maybe it's a false impression.
If this software has helped you, consider getting your pro version. :)
Offline
It may very well be just a false impression. If you are generating random numbers out of such small range, chances of getting non-uniform distribution are quite high. For example, when you want to generate a random sequence of 6 digits, you are better off generating a random value in range [0..999999] instead of generating 6 individual digits in range [0..9].
Offline
Ok, thanks for the example, that was what I was doing. I'll try the other way.
If this software has helped you, consider getting your pro version. :)
Offline
I did a try without pascal
I took a sample of 50 random numbers as they appeared in ReNamer, I mean, there's no process of selection.
This is what I get, and I highlighted the things that made me feel something strange... (I know that things can happen, but so often?)
378426901
90 1010 2 33 8
22 7 55 74830
59 55 134041
7 3333 29340
568 30 5 30 79
2197925742
52389 00 736
8 99 757 22 25
8374756860
05 11 368474
59186 1111 9
16238103 44
43 27 4972 27
77 69842040
1812327038
507 444 0545
264 8585 478
9641573027
1393205769
26786 444 83
65247157 55
19 55 016545
12 33 973178
7489317243
3278169079
7 27 48475 27
27 6 27 46 44 7
79736 44 315
8419879590
385 11 55 938
914705 333 0
253 22 38307
7829807473
6063204 99 3
805 00 73 00 7
4858259136
2 99 3024675
5612 88 2080
10407615 11
4672169510
3214857909
82393295 99
8564 00 95 22
19238176 00
4172736520
3 99 00 92 33 0
77 14 11 6154
97 897 01 89 4 // (97 & 89)
4 82 6907 82 3
Last edited by SafetyCar (2011-05-14 08:42)
If this software has helped you, consider getting your pro version. :)
Offline
I've tested another pseudo random generator and it produced similar results to yours. I've also tried a service which claims to provide true random numbers at Random.org using atmospheric noise and guess what? It also produced similar results. I guess it is just a statistical fact that numbers within a random number can have such patterns and such patterns have a considerable probability of occurring.
I hope this will satisfy your paranoia
Offline
Ok, sorry for the inconveniences
.
Last edited by SafetyCar (2011-05-20 12:26)
If this software has helped you, consider getting your pro version. :)
Offline
Ok, sorry for the inconveniences.
No problem, you were right to question it anyway!
Offline
Pages: 1