# HP 48gII User Manual Page 556

Graphing calculator.

Random number generators, in general, operate by taking a value, called the
"seed" of the generator, and performing some mathematical algorithm on that
"seed" that generates a new (pseudo)random number.
generate a sequence of number and be able to repeat the same sequence
later, you can change the "seed" of the generator by using function RDZ(n),
where n is the "seed," before generating the sequence. Random number
generators operate by starting with a "seed" number that is transformed into
the first random number of the series. The current number then serves as the
"seed" for the next number and so on. By "re-seeding" the sequence with the
same number you can reproduce the same sequence more than once. For
example, try the following:
RDZ(0.25) `
RAND() `
RAND() `
RAND() `
Re-start the sequence:
RDZ(0.25) `
RAND() `
RAND() `
RAND() `
To generate a sequence of random numbers use function SEQ. For example,
to generate a list of 5 random numbers you can use, in ALG mode:
SEQ(RAND(),j,1,5,1). In RPN mode, use the following program:
«
n « 1 n FOR j RND NEXT n
Store it into variable RLST (Random LiST), and use J5@RLST! to produce a
list of 5 random numbers.
Function RNDM(n,m) can be used to generate a matrix of n rows and m
columns whose elements are random integers between -1 and 1(see Chapter
10).
Use 0.25 as the "seed."
First random number = 0.75285...
Second random number = 0.51109...
Third random number= 0.085429....
Use 0.25 as the "seed."
First random number = 0.75285...
Second random number = 0.51109...
Third random number= 0.085429....
LIST " "
If you want to
Page 17-3