Random numbers and processors

I'm working on a few programs that use random numbers as their cornerstone. It makes one random number, then from there, does it's thing. Throughout the program, random numbers keep getting generated, and this works off of the first random number. So, if the program randomized to 0, and then drew up four random numbers (with a choice between 0 and 1), it draws up 0010 -- On my intel, this is true, and on my dad's AMD, this is true. I gave the testing program to my brothers to see the results on a P2 and P3 processor. my question is this. If it is randomized to 0, and the program is ran on a cyrix for example, will the first 4 numbers be 0010, or will they differ?

Thanks.


Comments

  • : I'm working on a few programs that use random numbers as their cornerstone. It makes one random number, then from there, does it's thing. Throughout the program, random numbers keep getting generated, and this works off of the first random number. So, if the program randomized to 0, and then drew up four random numbers (with a choice between 0 and 1), it draws up 0010 -- On my intel, this is true, and on my dad's AMD, this is true. I gave the testing program to my brothers to see the results on a P2 and P3 processor. my question is this. If it is randomized to 0, and the program is ran on a cyrix for example, will the first 4 numbers be 0010, or will they differ?
    :
    : Thanks.
    :
    Hi Adam -
    Most so-called random number generators do not generate random numbers! In fact they are often referred to as "psuedo random number generators" because they actually generate a sequence of numbers that APPEAR to be random. It is a sequence however, and if you ran it long enough it would eventually begin to repeat the sequence. Like any other program, a pseudo-random number generator is based on an algorithm. If you applied the same algorithm to any computer, the output would be the same. So yes, the first four numbers will be the same.


  • Thanks Dude! That was exactly what I wanted to know.

    Geeks rule.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories