Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random function
#1
This is somthing that has been bothering me for awhile. In my math class my teacher was talking about how if you reset 2 of the same calculators and used the randint() function you would get the same answer on both calcs. He said somthing about the random number algo is not exactly random. And i was wondering how exactly does a computer select a number at random?
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#2
Doesn’t a computer pick it's "seed" number from timer?
and since it is almost impossible to start a program at the same time the numbers appear random?

or you could hook a geiger counter up to your PC and get a piece of radio active material. that would work.

http://computer.howstuffworks.com/question697.htm
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#3
It only takes the seed from the timer if you tell it to. If you don't seed it with the timer (or some other constantly changing number) you will always get the same series of numbers, due to the fact that there is no such thing as true randomity (if thats a word) only unpredictability.
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Reply
#4
Ok but what about a calulator that doesnt come equiped with a timer the only other seed that i could think of is user input but that isnt reliable.
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#5
Put a piece of radioactive material inside your calcuator with a geiger counter? Big Grin Big Grin Big Grin
Or maybe if its possible, get the voltage or something left in the batteries, since the batteries are the only non static element in your calcuator.
[Image: freebasic.png]
Reply
#6
Our lab uses radio static to determine random numbers
his sig left intentionally blank
Reply
#7
Quote:Or maybe if its possible, get the voltage or something left in the batteries, since the batteries are the only non static element in your calcuator.

No thats not it its somthing to do with how you use the calculator because like i said earlyer if you reset 2 of the same kind of calculators (ie ti83,ti83+) and use the randint() you will get the same answer
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#8
oh my, i just made an ass out of myself...(not the first time Sad )
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#9
Quote:No thats not it its somthing to do with how you use the calculator because like i said earlyer if you reset 2 of the same kind of calculators (ie ti83,ti83+) and use the randint() you will get the same answer
I figured that's what you meant. ;-)

I think it uses its internal timer (how else would the TI-84+ keep track of the time?) to generate a random number and then uses that number with a RANDOMIZE statement (in terms of QB) rather than using RANDOMIZE TIMER to generate the numbers.
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Reply
#10
none of the TI's that I know of keep track of the time....and I know the TI 83 doesn't and that the TI 86 doesn't, maybe the 84 does, thought that wouldn't make too much sense...
[Image: freebasic.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)