random number generators for calc

Michael Stahl mstahl at redhat.com
Fri Nov 30 08:34:00 PST 2012

On 30/11/12 17:07, tino wrote:
> 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 newer versions of boost have desirable features then upgrading that
is always an option, but that needs a lot of testing because of the wide
variety of different compilers and versions thereof that are currently
supposed to be able to build LO, and boosts tendency to use every
obscure C++ feature...

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

the header is sal/inc/rtl/random.h (which is apparently a C interface).

but why do we need a wrapper around boost in sal?  i mean i haven't
looked at the boost random stuff but unless its interface is horrible
(always a possibility with boost i guess) _and_ there are multiple
places where we'd want to call it, then why not use it directly from
Calc's formula implementation?

More information about the LibreOffice mailing list