RANDUNIFORM

RANDUNIFORM

Synopsis

RANDUNIFORM(a,b)

Description

RANDUNIFORM returns a random variate from the uniform (flat) distribution from a to b. The distribution is,

p(x) dx = {1 over (b-a)} dx : for a <= x < b.

p(x) dx = 0 : for x < a or b <= x.

  • If a > b RANDUNIFORM returns #NUM! error.

Examples

RANDUNIFORM(1.4,4.2) returns a random number greater than or equal to 1.4 but less than 4.2.

See also

RANDBETWEEN, RAND.