pub fn f64() -> f64Expand description
Generate a random f64, such that special or problematic values are much more common than normal.
The distribution is not statistically useful, but it ensures that all edge-case
values get a fair chance of being generated. This is better than using a regular
random number generator, because in the vast majority of cases, a random number
generator will generate perfectly regular and well-behaved values, and certain
values, like INFINITY and NAN may be impossible to generate.
The distribution is as follows:
- 25% normal values
- 25% subnormal values
- 25%
NANvalues, including all possible payloads, quiet and signalingNAN. - 25% “special” values, i.e. unique values with special properties such as
INFINITYand-0.0