HP 10413 Datasheet Page 281

  • Download
  • Add to my manuals
  • Print
  • Page
    / 331
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 280
281
PERM(n,r)
This function gives the value of
n
r
P using the
formula
!
()!
n
r
n
P
nr
=
.
Eg. How many ways can 3 Math, 4 English, and 6 German books be
arranged on a shelf if all the books from a subject must be together?
Ans:
()
346
346
3!PPP×× ×
RANDOM
This function supplies a random 12 digit
number between zero and one. If you want a
series of random numbers, just keep pressing
ENTER after the first one.
Eg. Produce a set of random integers
between 5 and 15 inclusive.
Use the expression INT(RANDOM*11)+5
The RANDOM*11 produces a range from 0 to
10.999999. This is then dropped down to the
integer below by the INT function, giving a
range of integers 0,1,2,3,...,10. The
final adding of 5 gives the correct range.
The
RANDSEED
command
It is important to realize that these are not truly random numbers. Inside the
calculator is a mathematical procedure (an algorithm) which uses a ‘seed’
number to produce them. Unfortunately, taken straight out of the box, two
hp 39g+’s will produce exactly the same sequence of “random” numbers!
This can be a problem in that, for example, a class set of calculators doing a
simulation of dice would all produce the same numbers.
The simple solution is to seed the random
number algorithm with different values for each
machine. This is done using the function
RANDSEED(…) and, providing each person
uses a different number, it should only be necessary to do it once (unless the
calculator is reset). The simplest method is to use RANDSEED(Time) since
the value of Time will be different on each calculator.
Page view 280
1 2 ... 276 277 278 279 280 281 282 283 284 285 286 ... 330 331

Comments to this Manuals

No comments