#d optgen_text \__newline__ The optional parameter \exmp{g} may be used to \ \__newline__ specify the underlying random number generator. See the \ \__newline__ documentation for the \sfun{rand_new} function for more information. #d optparm_text \optgen_text \ \__newline__ The \exmp{num} parameter indicates that \exmp{num} random values are to \ \__newline__ be generated and returned as an array. \function{rand_exp} \synopsis{Generate exponentially distributed random numbers} \usage{X = rand_exp([Rand_Type g,] beta [,num])} \description This function generates random numbers that are distributed according to an exponential distribution with parameter beta > 0. The distribution's probability density is given by #v+ P(x,beta) = (1/beta) exp(-x/beta) #v- \optparm_text \notes The exponential generator is commonly used to simulate waiting times between events. \seealso{rand_new, rand_uniform} \done \function{rand_int} \synopsis{Generate random integers} \usage{X = rand_int ([Rand_Type g,] imin, imax [,num])} \description This function may be used to generate a random integer \exmp{X} such that \exmp{imin <= X <= imax}. \optparm_text \seealso{rand_uniform, rand, rand_new} \done \function{rand_tdist} \synopsis{Generate random numbers from the Student t distribution} \usage{X = rand_tdist ([Rand_Type g,] nu [,num])} \description This function generates random numbers that are distributed according to the Student-t distribution with nu>0.0 degrees of freedom. \optparm_text \seealso{rand_uniform, rand_new, rand_chisq, rand_fdist} \done \function{rand_fdist} \synopsis{Generate random numbers from the F distribution} \usage{X = rand_fdist ([Rand_Type g,], nu1, nu2 [,num])} \description This function generates random numbers that are distributed according to the F-distribution, which is the ratio of two chi-squared distributed variates whose degrees of freedom are given by \exmp{nu1} (numerator) and \exmp{nu2} (denominator). \optparm_text \seealso{rand_uniform, rand_chisq, rand_tdist, rand_gauss, rand_new} \done \function{rand_chisq} \synopsis{Generate Chi-Square distributed random numbers} \usage{X = rand_fdist ([Rand_Type g,] nu, [,num])} \description This function generates random numbers that are distributed according to the Chi-squared distribution with \exmp{nu > 0} degrees of freedom. \optparm_text \seealso{rand_uniform, rand_fdist, rand_tdist, rand_gauss, rand_new} \done \function{rand_flat} \synopsis{Generate uniformly distributed random numbers} \usage{X = rand_fdist ([Rand_Type g,] xmin, xmax [,num])} \description This function generates random double-precision floating point numbers that are uniformly distributed in the range \exmp{xmin<=X0.0}. \optparm_text \seealso{rand_beta, rand_uniform, rand_binomial, rand_new} \done \function{rand_binomial} \synopsis{Generate random numbers from the binomial distribution} \usage{X = rand_binomial ([Rand_Type g,], p, n, [,num])} \description This function generates binomial distributed random numbers according to the probability density #v+ P(x;p,n) = n!/(k!*(n-k)!) * p^k * (1-p)^(n-k) #v- where \exmp{n} is a non-negative integer and \exmp{0<=p<=1}. \optparm_text \seealso{rand_gamma, rand_poisson, rand_uniform, rand_new} \done \function{rand_poisson} \synopsis{Generate Poisson distributed random numbers} \usage{k = rand_poisson ([Rand_Type g,] mu [,num])} \description This function generates random unsigned integers that are poisson-distributed according to the probability distribution #v+ P(k;mu) = mu^k/k! * exp(-mu) #v- where \exmp{mu>0.0}. \optparm_text \seealso{rand_gauss, rand_uniform, rand_binomial, rand_new} \done \function{rand_geometric} \synopsis{Generate random numbers from the geometric distribution} \usage{k = rand_geometric ([Rand_Type g,] p [,num])} \description This function generates random numbers that are distributed according to a geometric distribution with a probability density #v+ P(k; p) = p*(1-p)^(k-1) #v- where \exmp{0<=p<=1} \optparm_text \seealso{rand_poisson, rand_exp, rand_gauss, rand_uniform, rand_new} \done \function{rand_cauchy} \synopsis{Generate random numbers from the Cauchy distribution} \usage{X = rand_cauchy ([Rand_Type g,] gamma [,num])} \description This function generates random numbers that are distributed according to a cauchy-distribution with a probability density #v+ P(x; gamma) = 1/(PI*gamma)/(1+(x/gamma)^2) #v- where \exmp{gamma>=0.0}. \optparm_text \seealso{rand_gauss, rand_poisson, rand_exp, rand_new} \done \function{rand_beta} \synopsis{Generate random numbers from the beta distribution} \usage{X = rand_fdist ([Rand_Type g,] a, b [,num])} \description This function generates random numbers that are distributed according to a Beta-distribution with a probability density #v+ P(x; a,b) = x^(a-1)*(1-x)^(b-1)/B(a,b) #v- where \exmp{a, b > 0}. \seealso{rand_gamma, rand_binomial, rand_chisq} \done \function{rand_gauss} \synopsis{Generate gaussian-distributed random numbers} \usage{X = rand_gauss ([Rand_Type g,] sigma [,num])} \description This function generates gaussian random numbers with the specified sigma and mean of 0 according to the probability density #v+ P(x; sigma) = 1/sqrt(2*PI*sigma^2) * exp(-0.5*x^2/sigma^2) #v- \optparm_text \notes This implementation utilizes the Box-Muller algorithm. \seealso{rand_uniform, rand_poisson, rand_chisq, rand_gauss, rand_new} \done \function{rand} \synopsis{Generate random integers numbers} \usage{X = rand ([Rand_Type g,] [,num])} \description This function generates unsigned 32 bit randomly distributed integers on the closed interval 0<=X<=0xFFFFFFFFUL. \optparm_text \seealso{rand_new, rand_int, rand_uniform, rand_flat} \done \function{rand_uniform_pos} \synopsis{Generate uniform positive random numbers} \usage{X = rand_uniform_pos ([Rand_Type] [num])} \description This function generates uniformly distributed random numbers in open interval \exmp{0