Draft: fix tests for log2_approx and log2_approx64
Compare changes
- Thomas Schlichter authored
The test was actually never executed correctly (unsigned -10 is never <= 10), and log2_approx64_ref() was not accurate enough. Therefore replace it by directly comparing one value above and one value below each rounding boundary.
@@ -10,25 +10,27 @@ uint8_t log2_approx_ref(uint32_t x)