randomFloat64 returns a uniformly distributed value in the range [0,1). Note that the values returned are all multiples of 2**-53, which means that not all possible values in this range are returned.
(r ...*rand.Rand)
| 124 | // Note that the values returned are all multiples of 2**-53, which means that |
| 125 | // not all possible values in this range are returned. |
| 126 | func randomFloat64(r ...*rand.Rand) float64 { |
| 127 | const randomFloatBits = 53 |
| 128 | return math.Ldexp(float64(randomBits(randomFloatBits, r...)), -randomFloatBits) |
| 129 | } |
| 130 | |
| 131 | // randomUniformInt returns a uniformly distributed integer in the range [0,n). |
| 132 | // NOTE: This is replicated here to stay in sync with how the C++ code generates |
no test coverage detected
searching dependent graphs…