A yellow-book of pseudo-random number generation of modern programming languages.
List ordering follows TIOBE Index.
Random function is not present in ANSI SQL standard and should be specified in accordance with respective implementations.
i
isINTEGER
andr
isREAL
.- Declare output variable first and pass it to
RANDOM_NUMBER
.PROGRAM test_random_number REAL :: r CALL RANDOM_NUMBER(r) END PROGRAM
$RANDOM
returns an integer in the range 0 ~ 32767. To get a floating number in range of [0..1)
, divide it by 32768
.