On Tue, Dec 18, 2012 at 1:56 PM, Pedro Giffuni <p...@apache.org> wrote: > Hi Rob; > > > ----- Messaggio originale ----- >> Da: Rob Weir > ... >> >> On Dec 18, 2012, at 10:12 AM, Pedro Giffuni wrote: >> >>> Hello; >>> >>> Just to get the general public to know some of the things there are going >> on in >>> the AOO code, Andrea and I have been preparing a blog post about the new >>> random number generator: >>> >>> >> https://blogs.apache.org/preview/OOo/?previewEntry=random_numbers_in_calc_small >>> >> >> Nice. Is it worth describing the testing? In particular, do we have >> any tests that show clear improvements? Anything that can be shown in >> a chart? >> > > The test I did were pretty simple: I only generated a graph with 1000 values > and > then regenerated several times a complete row (more that 1 million values) to > see no values were negative or overflowed. > > The problem is that in the platforms I use the period of libc's rand() is > already > long enough that a graphic plot of just 500-1000 values wont show any > periodicity. >
But would the earlier implementation also pass that same test? Two test suites specifically for pseudo random number generators are: Dieharder: http://www.phy.duke.edu/~rgb/General/dieharder.php and this test from NIST: http://csrc.nist.gov/groups/ST/toolkit/rng/index.html > The algorithm is known to pass some very strict statistical tests though. > And that is an important thing, that we are starting with an algorithm that is already well known. But any given implementation, due to subtleties of the implementation details, might not do as well as theory. We see that with crypto all the time. So it might be worth encouraging some more rigorous testing here. In fact, maybe your blog post can help recruit some volunteers? Say that we take our numeric algorithms very seriously, we're looking for the best. This shows in our use of COIN-MP solver code, but also in our new PRNG. We encourage anyone who wants to help to put our code through rigorous tests and help us find any problems, etc. -Rob > Pedro.