17.4.2. Other Kinds of Distributions
The engines produce unsigned
numbers, and each number in the engine’s range has the same likelihood of being generated. Applications often need numbers of different types or distributions. The library handles both these needs by defining different distributions that, when used with an engine, produce the desired results. Table 17.16 (overleaf) lists the operations supported by the distribution types.
Generating Random Real Numbers
Programs often need a source of random floating-point values. In particular, programs frequently need random numbers between zero and one.
Get C++ Primer, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.