rust-lang/rust — pull request #18534 by huonw (2014-11-02 11:52:53+00:00)
Title: rand: Add next_f64/f32 to Rng.

Some random number generates output floating point numbers directly, so
by providing these methods all the functionality in librand is available
with high-performance for these things.

An example of such an is [dSFMT (Double precision SIMD-oriented Fast
Mersenne Twister)](http://www.math.sci.hiroshima-u.ac.jp/~%20m-mat/MT/SFMT/index.html#dSFMT).

The choice to use the open interval [0, 1) has backing elsewhere,
e.g. GSL (GNU Scientific Library) [uses this range](https://www.gnu.org/software/gsl/manual/html_node/Sampling-from-a-random-number-generator.html), and dSFMT supports
generating this natively (I believe the most natural range for that
library is [1, 2), but that is not totally sensible from a user
perspective, and would trip people up).

Fixes https://github.com/rust-lang/rfcs/issues/425.