Hi, On Wednesday, 2012-11-28 17:41:14 -0500, Kohei Yoshida wrote:
On Wed, Nov 28, 2012 at 5:07 PM, tino <ttk448@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 https://bugs.freedesktop.org/show_bug.cgi?id=33365#c13
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 http://wiki.documentfoundation.org/Development/ODF_Implementer_Notes#LibreOffice_OpenFormula_extensions Of course interoperability depends on other ODF readers' implementation. Eike -- 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
Attachment:
pgpeocu6vn2LQ.pgp
Description: PGP signature