0. <= r < 1.Some examples of random number generators are:- From this starting point it is possible to generate both discrete and continuous processes. As an example of the former, consider the tossing of a coin. Values of the random number r less than 0.5 could be assigned heads and the remainder tails. As an example of the later consider an exponential decay with a decay constant t. This can be produced by the function
-t*log(r)A wide variety distributions can be generated analytically in this way. In cases where the distribution to be simulated is only available as a histogram, it can be sampled with r by:-
Individual experimental groups tend not to don't write their own software, but instead collaborate to produce codes that can be shared. Some examples are:-
is normally the area left to individual experimental groups to work on. Nowadays the software is usually written in C++ although some older codes that use Fortran can still be found. People working on Monte Carlo software need to know about Software Development