manpagez: man pages & more
info gnuplot
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13.1.65 Random number generator

The behavior of the built-in function `rand(x)` has changed as of version 3.8l. Older scripts that expected rand(x>0) to produce sequential pseudo-random numbers from the same seeded sequence must be changed to call rand(0) instead. The current behavior is as follows:

 
 `rand(0)`  returns a pseudo random number in the interval [0:1] generated
            from the current value of two internal 32-bit seeds.
 `rand(-1)` resets both seeds to a standard value.
 `rand(x)`  for x>0 sets both seeds to a value based on the value of x.
 `rand({x,y})` for x>0 sets seed1 to x and seed2 to y.


© manpagez.com 2000-2025
Individual documents may contain additional copyright information.