|
From: sfeam <eam...@gm...> - 2019-02-27 06:01:22
|
On Wednesday, 27 February 2019 06:47:23 theozh wrote:
> with rand(0) you can generate pseudo-random numbers x in gnuplot.
> According to the manual they are in the interval [0:1].
> From this, I would conclude (0 <= x <= 1), i.e. 0 and 1 are included and possible values to appear, correct?
rand(0) ∈ (0,1)
That is, the endpoints are not included in the range.
>From the source code in internal.c:
/***********************************************************************
double ranf(double init)
Random number generator as a Function
Returns a random floating point number from a uniform distribution
over 0 - 1 (endpoints of this interval are not returned) using a
large integer generator.
This is a transcription from Pascal to Fortran of routine
Uniform_01 from the paper
L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
with Splitting Facilities." ACM Transactions on Mathematical
Software, 17:98-111 (1991)
Ethan
|