Home | History | Annotate | Download | only in rand

Lines Matching defs:Float64

8 // Float64 and Int, use a default shared Source that produces a deterministic
149 // Float64 returns, as a float64, a pseudo-random number in [0.0,1.0).
150 func (r *Rand) Float64() float64 {
152 // return float64(r.Int63n(1<<53)) / (1<<53)
154 // return float64(r.Int63()) / (1 << 63)
161 // We tried to fix this by mapping 1.0 back to 0.0, but since float64
168 f := float64(r.Int63()) / (1 << 63)
177 // Same rationale as in Float64: we want to preserve the Go 1 value
179 // This only happens 1/2²? of the time (plus the 1/2?³ of the time in Float64).
181 f := float32(r.Float64())
278 // Float64 returns, as a float64, a pseudo-random number in [0.0,1.0)
280 func Float64() float64 { return globalRand.Float64() }
295 // NormFloat64 returns a normally distributed float64 in the range
304 func NormFloat64() float64 { return globalRand.NormFloat64() }
306 // ExpFloat64 returns an exponentially distributed float64 in the range
314 func ExpFloat64() float64 { return globalRand.ExpFloat64() }