Draft: fix tests for log2_approx and log2_approx64
All threads resolved!
All threads resolved!
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,11 +10,6 @@ uint8_t log2_approx_ref(uint32_t x)
@@ -23,12 +18,10 @@ TEST(log2_approx, complete)