- start/end values were underrepresented due to rounding.
Now extend the range to include -0.5 and +0.5 beyond the usual
range to ensure the same number density.
- this removes an OS-specific dependency (eg, drand48_r is not POSIX)
and allows easier use of other random number generators.
The Rand48 generator has identical behaviour and period as the
lrand48() library routine, but holds its own seed and state
(which makes it re-entrant) and can be combined with other
random distributions.
However, when using the modified form to obtain scalar values
they will not be identical to what drand48() yields.
This is because drand48() uses the raw 48-bit values to directly
set the mantissa of an IEEE double where as the newer distribution
normalizes based on the 32-bit value.
STYLE: simplify code in Random::shuffle and use Swap