random number generators for calc

tino ttk448 at gmail.com
Fri Nov 30 08:07:02 PST 2012


I've had a look at what Gnumeric offers, and they've done a big job on
random number generation. Comparing with what is available in boost
I've separated the list into rand functions which could be quickly
implemented using boost and those which can't (and would require more
intelligence to implement). Another problem might be that boost 1.44
which is currently used in libreoffice has even fewer distribution
functions implemented.

If there's interest, I'd be happy to work on a patch to implement the
first half of the functions into
 core/sal/rtl/source/math.cxx
or maybe random.cxx? However, random.* seems not that well
maintained as there's no random.hxx.

http://www.boost.org/doc/libs/1_52_0/doc/html/boost_random/reference.html#boost_random.reference.distributions

gnumeric rand functions (available in boost)
--------------------------------------------
randbernoulli	random variate from a Bernoulli distribution
randbetween	a random integer number between and including bottom and
randbinom	random variate from a binomial distribution
randcauchy	random variate from a Cauchy or Lorentz distribution
randchisq	random variate from a Chi-square distribution
randdiscrete	random variate from a finite discrete distribution
randexp		random variate from an exponential distribution
randfdist	random variate from an F distribution
randgamma	random variate from a Gamma distribution
randgeom	random variate from a geometric distribution
randlognorm	random variate from a lognormal distribution
randnegbinom	random variate from a negative binomial distribution
randnorm	random variate from a normal distribution
randpoisson	random variate from a Poisson distribution
randtdist	random variate from a Student t distribution
randuniform	random variate from the uniform distribution from a to b
randweibull	random variate from a Weibull distribution


gnumeric rand functions (not available in boost)
------------------------------------------------
randbeta	random variate from a Beta distribution
randexppow	random variate from an exponential power distribution
randgumbel	random variate from a Gumbel distribution
randhyperg	random variate from a hypergeometric distribution
randlandau	random variate from the Landau distribution
randlaplace	random variate from a Laplace distribution
randlevy	random variate from a Levy distribution
randlog		random variate from a logarithmic distribution
randlogistic	random variate from a logistic distribution
randnormtail	random variate from the uppertail of a normal distribution
randpareto	random variate from a Pareto distribution
randrayleigh	random variate from a Rayleigh distribution
randrayleightail	random variate from the tail of a Rayleigh distri
randsnorm	random variate from a skew normal distribution
randstdist	random variate from a skew t distribution



More information about the LibreOffice mailing list