random number generators for calc

Eike Rathke erack at redhat.com
Thu Nov 29 04:42:00 PST 2012


On Wednesday, 2012-11-28 17:41:14 -0500, Kohei Yoshida wrote:
> On Wed, Nov 28, 2012 at 5:07 PM, tino <ttk448 at gmail.com> wrote:
> > > Well, re-implementing the existing RAND and RANDBETWEEN with the new
> > > generator is no brainer.

Btw, see the pointers I added to

> > 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).

Isn't boost::mt19937 somewhat overkill for the simple RAND() functions?

> > 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.

If we wrote such functions as, for example, ORG.LIBREOFFICE.RANDNORMAL
we would be compliant, similar to other functions listed at

Of course interoperability depends on other ODF readers' implementation.


LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121129/a84208f2/attachment-0001.pgp>

More information about the LibreOffice mailing list