Fix log_int implementation, removing floats

The cast from f32::MAX to u32 was undefined behaviour, and the use of floating
point logarithms would yield incorrect results due to rounding and truncation,
e.g. for the integer 16777206
This commit is contained in:
Michael Sproul
2019-03-02 15:52:33 +11:00
parent 8671c5790c
commit 6795aa42b2
2 changed files with 15 additions and 15 deletions

View File

@@ -8,7 +8,6 @@ edition = "2018"
db = { path = "../../beacon_node/db" }
ssz = { path = "../utils/ssz" }
types = { path = "../types" }
fast-math = "0.1.1"
log = "0.4.6"
bit-vec = "0.5.0"