mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
common/rand: Remove exponential distribution functions (#1979)
We were computing these functions incorrectly. I'm not sure what distribution these numbers are, but it isn't the normal exponential distribution. (We're making the probability of getting a number of a particular bitlength equal, but the number in that bitlength thats gets chosen is uniformly chosen) We weren't using these functions anywhere in our codebase, and they had a nomenclature error. (There aren't exponentially distributed integers, instead they would be geometrically distributed)
This commit is contained in:
@ -73,9 +73,6 @@ func testThemAll() string {
|
||||
fmt.Fprintf(out, "randInt64: %d\n", RandInt64())
|
||||
fmt.Fprintf(out, "randUint32: %d\n", RandUint32())
|
||||
fmt.Fprintf(out, "randUint64: %d\n", RandUint64())
|
||||
fmt.Fprintf(out, "randUint16Exp: %d\n", RandUint16Exp())
|
||||
fmt.Fprintf(out, "randUint32Exp: %d\n", RandUint32Exp())
|
||||
fmt.Fprintf(out, "randUint64Exp: %d\n", RandUint64Exp())
|
||||
return out.String()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user