<br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 5:07 PM, tino <span dir="ltr"><<a href="mailto:ttk448@gmail.com" target="_blank">ttk448@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> >What is your opinion on implementing generators for other<br>
> >distributions like normal and all the ones listed under statistics<br>
> >(which calculate densities but don't generate)?<br>
><br>
> Well, re-implementing the existing RAND and RANDBETWEEN with the new<br>
> generator is no brainer. But I'm not sure if we really need to<br>
> provide multiple variants for different random number generators.<br>
> What we could do is to specify a run-time option for the algorithm<br>
> for the normal RAND and RANDBETWEEN functions rather than providing<br>
> multiple variants. That would be my preference. We already have<br>
> formula engine options in Tools - Options (in the Formula tab page),<br>
> so adding another one shouldn't be too difficult.<br>
<br>
</div>Not sure I understand. My suggestion is that boost::mt19937 is the<br>
only underlying generator algorithm (generating int's) which is then<br>
transformed to get RAND() and RANDBETWEEN(i,j). Yet both are simple<br>
uniform distributions but the user might need Normal distributed<br>
random variables and then RAND() is of little use. So a function like<br>
RANDNORMAL() which generates N(0,1) (still using boost::mt19937)<br>
random numbers would be a useful addition, wouldn't it?<br></blockquote><div><br>Ah ok. I think I mis-understood. Bear with me, as I'm not that versed with random number generation algorithms at the moment.<br><br>
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.<br><br>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?<br>
<br>Kohei <br></div></div><br>