manual:chapter6:statistics:cmd_rand

Synopsis


Generate a pseudo-random real number

Stack Diagram


Input Stack Output Stack
Rpseudo-random
Level 1 / Argument 1 Level 1

Legend

Keyword type Function
Parallel list processing capabilities Group 1 Commands that cannot parallel process
Affected by flags None

Description


The RAND function returns a pseudo-random number. The sequence is generated by the xoroshiro128+ (v1.0) pseudo-random number generator.

Compatibility


RAND is fully equivalent to its userRPL counterpart.

Usage


Input

« 32 SETPREC
  -1 RDZ
  RAND
»


Output

4:                                      
3:                                      
2:                                      
1:                        0.437333743646
…………………………………………………………………………………………………………
                                        

Related Commands


Statistics 2

Command Short Description
RDZ Initialize random number generator with a seed
RAND Generate a random real number
  • manual/chapter6/statistics/cmd_rand.txt
  • Last modified: 2021/09/19 15:06
  • by jojo1973