![]() |
random numbers
anyone know how something that suppose to take commands and act on those commands, a computer, GENERATE a random numbers?
|
HUH?!
|
Rephrase please =/
|
Quote:
I think thats the idea no, I dont know |
i think he's asking how something with a set formula and set parameters can prduce something completely random. Well, to the best of my knowlege, its not completely random. there are set parameters(orguidlines i guess u could say) and them a value or figure is selected within those parameters. sort of like rolling a pair of dice, you can never go higher than 12 or lower than 2, but anything in between is random. in a way its still controlled though, because you have to tell yourself to roll the dice.
I hope that was a good analogy, and i hope i was correct and helped you out. |
it's... RANDOMIZE!! yes random ness is good
|
What i'm trying to say is simply, how do computers generate random numbers?
and i know there are set parameters. but for example, i tell me calculator de create random intergers, and it just start spitting out random numbers, no patterns... just RANDOM... where do these numbers come from?! |
Quote:
|
yea, can u be a bit more specific please
|
A long read
The C++ command for generation I can't find the actual formulas these functions use as they are copyrighted and kept secret by their creators. |
I assume there is a random number generator someplace in Linux, right? Happy hunting :p
|
that says nothing, the command is telling C++ to generate a random number, but not actually calculating one.
let's say, printf ("A number between 0 and 99: %d\n", rand()%100); and the ouput is 46 where did that 46 come from? no one seems to understand my question. But i think i should have just left it alone after the small clock theory, cuz that's probably as accurate as it will get |
IIRC Linux has a random number generator proccess that is accessed by other programs. Also, you can get open source standard libraries for at least the Linux platform, which should either include a random number generator, or a call to the afforementioned.
|
I have a random number generator its my left and right hands!
573457123762827359 random as hell number!!!!!! |
That works!
|
hres mine
18648746894543454365438674863 |
I know it's a process that has to be seeded... if you use the same seed number, you'll keep getting the same "random" numbers in a sequence. You're right, it's usually the number of seconds elapsed since midnight that's used as the seed number.
RANDOMIZE TIMER |
Actually, it's the number of seconds since midnight or reset, whichever is more recent :p
|
so what if u generate 2 random numbers at the same time?
|
They still won't be generated at the exact same time. A computer cannot do that. It still only processes a single 1 or 0 at a given time.
The time when it reaches the second number will be slightly different, probably enough to make it different. However, if you had two comps running simultaneously at the exact same time, you could get the same number. |
All times are GMT -6. The time now is 11:36 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.