HP -11C Owner's Handbook Manual page 29

Hide thumbs Also See for HP-11C:
Table of Contents

Advertisement

54
Section 3: Numeric Functions
Example
To Calculate
Keystrokes
Permutation
Example: 10 items in
arrangements of 3 at
atime.
10 [ENTER
10.0000
3HPix)
720.0000
Combination
Example: 10 items in
sets of 3 at atime.
10 (ENTER
10.0000
7
3(e)[en.x)
120.0000
Statistics Functions
Random Number Generator
The HP-11C's random number generator uses either an auto-
matically stored seed (zero), or a seed you key in, to initiate a
uniformly
distributed
pseudo-random
number
sequence
in the
range 0 <r < 1.* Because of Continuous Memory, the sequence will
continue until a new initial seed is stored.
Random
Number
Seed. To initiate
a new random
number
sequence at any time, place a new seed in the random number
generator by keying in any number 0 <n <1' and pressing (STO)[f)
(RAN#]. To generate a random number, simply press [f] (RAN#]. The
new random number will appear in the displayed X-register. ([f)
RAN | affects the stack in the same way as recalling a number from
a storage register.) The newly generated random
number
also
becomes the seed for the next random number in the current
sequence. Whenever Continuous Memory is reset, or when a power
failure occurs, the random number seed is set to zero. (Repeated use
of the same
value
for a random
number
seed will produce
repetitions of the same random number sequence.)
* Passes the spectral test (Knuth, Vol. 2).
+f a number whose magnitude is > 1 is used as a seed, the decimal point in the stored
version af the number will be shifted to the left
of the firet significant digit. For example,
123.0, 12.3, and 0.123 would all be stored as 0.123 by [STO)(F)[RAN®
~~ vw
~~
yw
Section 3: Numeric Functions
55
Random Number
Example
Display
Generation
Keystrokes
To store 0.5764 asa
random number seed:
(Arbitary Seed)
(5764
0.5764
«|
STO|lf
Seed stored
RAN#
0.5764
|
To generate a random
number series based on
the above seed:
(RANA
0.3422
(A(RANS
0.2809
For a further discussion of the random number generator, refer to
page 217, Random Numbers, in part III of this handbook.
Accumulating Statistics
(£4) is a two-number function that calculates statistics of the
values in the X- and Y-registers. The results are automatically
accumulated in storage registers Ry through Rs.
T>
z>
Y>
x>
Any values
remaining
in Ro through
Rs from previous
calculations
or storage
operations
will be included
in
subsequent
statistics
accumulations.
To
ensure
that
all
accumulations registers are set to zero before beginning a
new series of accumulations, press [f] CLEAR
(clears Ro
through Rs and the stack) before beginning the operation.
L

Advertisement

Table of Contents
loading

Table of Contents