Generation of uniformly distributed random numbers (0,1) - page 4

 

What is "enhancement", gumgum? What do you mean by "enhancement", what is the specific meaning?

 

(MathRand() / 32766.0) + (MathRand() / (32766.0*32766.0))

:)

 
I optimise the network by random search. And
(MathRand()+1.)/32768.
it's not much. And my generation (0.1) eats up time. So I created a topic and ended up, as always...
 
gumgum писал(а) >>

Where is the stupidity here. All numbers are rational (in this case finite (Q-count)). The higher the reliability the better.

Come on, you know, the RNG generates a countable finite a set. And by the way in finite time. On the interval (0,1) even rational numbers are infinitely many! An infinite set, not finite, as you wrote.

If you use your proposed formula, it means that you divide the interval (0,1) into 32768 equal segments. Now, in order to fill them with evenly with random numbers, how many would you have to generate? At least 1000 pieces per segment ("The more reliable the better"). How long will it take you?

What if the segments are not 32768 but 1000000 ?

So I repeat the question. How many need to be between n/32768 and n+1/32768 to be good ?

 
Avals >>:

(MathRand() / 32766.0) + (MathRand() / (32766.0*32766.0))

:)

That's original. You could create a row... Cp

 
A little question on the subject, and some DLL returning pseudorandom numbers, let it be the same standard C-based Rand, which wraps MathRand MQL, but for example on computer status, cursor position or something else, has anyone found? I think I've seen it somewhere, but I can't remember where....
 
Yurixx >>:

Родимыыый, ты ж сообрази: ГСЧ генерит счетное, конечное множество. И между прочим за конечное время. А на интервале (0,1) даже рациональных чисел бесконечно много ! Бесконечное множество, а не конечное, как ты написал.

Если ты воспользуешься предложенной тебе формулой, то это значит, что ты делишь интервал (0,1) на 32768 равных сегментов. Теперь, чтобы заполнить их равномерно случайными числами сколько нужно их сгенерить ? Ну как минимум, чтобы в каждый попадало 1000 штук ("Чем выще степень надежности тем лучьше"). Сколько это у тебя займет времени ?

А если сегментов будет не 32768, а 1000000 ?

Так что повторяю вопрос. Сколько нужно чтобы было между n/32768 и n+1/32768 чтобы было хорошо ?



Bl.... I said 1/32767........n/32767 of course n e [0.32767]! Offer your generator that's all(I'll say thank you). Certainly not the "obviously" rational numbers alone.
 
Figar0 >>:
Маленький вопросец в тему, а какой-нибудь ДЛЛ возвращающей псевдослучайные числа пусть тем же стандартным си-шным Rand, оберткой которого является MathRand MQL, но например от состояния компьютера, положения курсора или чего никто не встречал? Сдается мне где-то попадалась, но где вспомнить не могу....

This is essentially a random number generator, not a "pseudo" one. When I was a student, I used to connect the output of a radio, tuned away from radio stations, to the input of a sound card, and then take the low bit of the signal level - you get real digital white noise with a perfectly deltaic autocorrelation function:))))

 
alsu писал(а) >>

This is essentially a random number generator, not a "pseudo" one. I remember back in my student days, out of sporting interest, I connected a radio output to the input of a sound card, tuned away from radio stations, and then took the low bit of the signal level - you get real digital white noise with a perfectly delta-like autocorrelation function:))))

Just the other day I read the description of this experiment. I realized, that I can't do it) Maybe it was just a description of your experience?

I don't really need it, I saw something like that, where the sequence was initialized with system time or something like that... Well, as usual, when you need it, you can't find it).

Z.I. I think it was on the forum of some lottery guys, no one's met?

 

gumgum, here is another link: https://forum.mql4.com/ru/19996/page4. But it has dll, but the generator is kind of cryptographic, i.e. more advanced than standard crt one. And it generates much more numbers, from -2^31 to 2^31 approximately. You can find everything you need in the same branch.

Reason: