![]() |
![]()
| ![]() |
![]()
NAMEstd::generate_canonical - std::generate_canonical Synopsis Defined in header <random>
Parametersg - generator to use to acquire entropy Return valueFloating point value in range \(\small [0,1)\)[0, 1). ExceptionsNone except from those thrown by g Notes Some existing implementations have a bug where they may
occasionally return 1.0 if
Example produce random numbers with 10 bits of randomness: this may
produce only k*R
// Run this code
Possible output:0.208143 0.824147 0.0278604 0.343183 0.0173263 0.864057 0.647037 0.539467 0.0583497 0.609219 See also uniform_real_distribution produces real values evenly distributed
across a range
|