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

 
SProgrammer >>:

Вам для исследований? Или для игр?


one.
 
gumgum >>:


первое.

Then both normality and "randomness should be enough". Get two, three to five random numbers from 0 to 1 - and multiply them if necessary.

 
SProgrammer >>:

Тогда и нормальности и "случайности должно хватить". получтите два, три - пять случайных чисел от 0 до 1 - и их перемножте если что.


0.9*0.9*........*0.9->0 corridor narrowing = (0+@,1-@)
 
gumgum >>:


первое.

Take an array of true random numbers - long MAX_INT and walk around using the same array.


Lists are available on the web e.g. http://www. random.org/integers/

 
gumgum >>:


0.9*0.9*........*0.9->0 коридор сужаются = (0+@,1-@)

No the distribution will hold true as proven mathematically.

 
gumgum >>:


0.9*0.9*........*0.9->0 коридор сужаются = (0+@,1-@)

:) Take the average of the 20.

 
SProgrammer >>:

Нет распределение будет сохранятся это доказывается математически.


Wrong. This (0-@,1-@) is the new boundary. If you take the average, then the corridor narrows to the central point.
 
gumgum >>:


Ошибся. Вот так (0-@,1-@) будут новые граници. Если брать среднееи то тогда Коридор сужаеться к центральной точке.

8-) I gave you a link to a TRUE random generator, on atmospheric noise. What's not enough again ? :)



http://www.random.org/

RANDOM.ORG offers true random numbers to anyone on the Internet. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs. People use RANDOM.ORG for holding drawings, lotteries and sweepstakes, to drive games and gambling sites, for scientific applications and for art and music.

 
SProgrammer >>:

8-) Я же Вам дал ссылку на ИСТИННО случайный генератор, на атмосферных шумах. Что опять не достаточно ? :)



http://www.random.org/



You have suggested to me.... but this is not a solution for me (with your permission). I already gave you how I generate the numbers I just thought there was a faster way (Mathemat suggested the possibility to speed up the algorithm). I think a dll would be the best solution.
 

It goes something like this... when rsign=1 [-1,1].... when rsign=0 [0,1]

double ranD(int rsign,int rstep)
{

double rand=0; 
   for(int i=1; i<= rstep; i++)
   {
   if(MathRand()+1>16383.5){rand+=MathPow(2,- i);}
   }
      if( rsign==1)
         {
         rand=2*rand-1;
         }

return(rand);
}
Thanks to Mathemat for the idea. Or maybe I did it wrong?