Random Number Generator

table of contents


rand
randList
randNorm
randBin
RandSeed

rand

Syntax: rand([a, b])
The “rand” function generates random numbers. If you do not specify an argument, “rand” generates 10-digit decimal values 0 or greater and less than 1. Specifying two integer values for the argument generates random numbers between them.

スティッキー
スティッキー
スティッキー

randList

Syntax: randList( n [, a, b])

  • Omitting arguments “a” and “b” returns a list of n elements that contain decimal random values.
  • Specifying arguments “a” and “b” returns a list of n elements that contain integer random values in the range of “a” through “b”.
  • “n” must be a positive integer.
  • The random numbers of each element are generated in accordance with “RandSeed” specifications.

スティッキー
スティッキー

randNorm

The “randNorm” function generates a 10-digit normal random number based on a specified mean μ and standard deviation σ values.
Syntax: randNorm(σ, μ [, n ])

  • Omitting a value for “n” (or specifying 1 for “ n ”) returns the generated random number as-is.
  • Specifying 2 or larger value for “n” returns the specified number of random values in list format.
  • “n” must be a positive integer, and “σ” must be greater than 0.

スティッキー
スティッキー

randBin

The “randBin” function generates binomial random numbers based on values specified for the number of trials n and probability P.
Syntax: randBin( n, P [, m ])

  • Omitting a value for “m” (or specifying 1 for “m”) returns the generated random number as-is.
  • Specifying a 2 or larger value for “m” returns the specified number of random values in list format.
  • “n” and “m” must be positive integers.

スティッキー
スティッキー

RandSeed

  • You can specify an integer from 0 to 9 for the argument of this command.
    0 specifies non-sequential random number generation. An integer from 1 to 9 uses the specified value as a seed for specification of sequential random numbers. The initial default argument for this command is 0.
  • The numbers generated by the application immediately after you specify sequential random number generation always follow the same random pattern.

スティッキー
スティッキー