Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Wed, Nov 28, 2012 at 5:07 PM, tino <ttk448@gmail.com> wrote:

What is your opinion on implementing generators for other
distributions like normal and all the ones listed under statistics
(which calculate densities but don't generate)?

Well, re-implementing the existing RAND and RANDBETWEEN with the new
generator is no brainer.  But I'm not sure if we really need to
provide multiple variants for different random number generators.
What we could do is to specify a run-time option for the algorithm
for the normal RAND and RANDBETWEEN functions rather than providing
multiple variants.  That would be my preference.  We already have
formula engine options in Tools - Options (in the Formula tab page),
so adding another one shouldn't be too difficult.

Not sure I understand. My suggestion is that boost::mt19937 is the
only underlying generator algorithm (generating int's) which is then
transformed to get RAND() and RANDBETWEEN(i,j). Yet both are simple
uniform distributions but the user might need Normal distributed
random variables and then RAND() is of little use. So a function like
RANDNORMAL() which generates N(0,1) (still using boost::mt19937)
random numbers would be a useful addition, wouldn't it?


Ah ok. I think I mis-understood. Bear with me, as I'm not that versed with
random number generation algorithms at the moment.

Well, my position is that, since you know the subject matter very well, and
if you think it's a useful addition then I'm with you.

My only concern is that, we try to be compliant with ODF formula
specification, and I'm not sure how adding a custom function (that only we
understand) would affect that compliance and interoperability with other
ODF generators.  I still want to encourage adding new and useful functions;
I just want to know what sort of things we need to be aware of when adding
our own custom functions. Eike, do you have any insight on this?

Kohei

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.