Generating a continuous numerical value

We have already shown how to generate a random rectangularly distributed value, but how can a numerical value be generated from another continuous distribution? There are several algorithms to generate random values from continuous numerical distributions and many are more efficient than the one that we describe below. It is however relatively easy to describe and understand.

Example