# Boost :

From: Paul Baxter (paje_at_[hidden])
Date: 1999-11-16 13:28:58

Further to the recent discussions on the MT and the general random number
class, a couple of points:

1) The link to the original MT site is available again
http://www.math.keio.ac.jp/~matumoto/emt.html )
2) The MT itself is free to use, however the code provided (including some
new simple validation bits and pieces) is LGPL (not GPL as Jeet initially
stated)
3) We'd need to provide an implementation that is LGPL/GPL free. Is Jeet's
code direct from the paper or derived from existing LGPL code?
4) RE: Distribution 'transformations'

As Dave Abrahams pointed out transforming from the uniform spread to a
defined distribution may well introduce quantisation problems in that some
values of the revised distribution could not be achieved.

Has anyone got any suggestions for how to generally quantify these effects.
(Maybe characterise worst case quantisation error or rms error??)

I can see that specifying more digits into the transformation would reduce
the quantisation problems in the resulting distribution.
So perhaps when instantiating using the generator type as a parameter, there
might be a second optional parameter defining the required 'quality' of the
output. (Which defaults to using the quantisation from 32 bit ->
distribution)

The distribution function could then decide if more than one call to the
underlying generator would be needed in order to ensure an adequate
distribution at the output.

If this is too complicated, perhaps the 'distribution object should be able
to describe its own quantisation problems either in the region of a
particular operating point, or over its entire range.

Simplistic example:
Say the output distribution was equivalent to y = x^2 over a small range of
its output and say y=x over other parts of its range.
The quantisation on the input 1,2,3 say would equate to an output of 1,4,9
i.e. the numbers 2,3,5,6,7,8 are not possible.

With a continuous function all output values would be possible, so we ought
to be able to decide to perhaps use inputs of say 1,1.5,2,2.5,3,3.5 to get
better output quantisation(analogous to using more bits in the input
function)

5) Do we have a draft specification for our random number framework yet?
I was thinking of creating some examples that could interface to some of the
random number tests (e.g. die-hard) and maybe compile some other simple
tests or complementary distribution functions.

Paul Baxter