Manually cleanup floatX types
- Remove where not needed (implied)
- Add parenthesis to make casting explicitly clear
- Add
usestatement to make it cleaner - Cleanup logic in the bit_cost.rs - BitsEntropy, using
max
The idea here is to allow floatX to either be f32 and f64...that way I think we can guarantee bit-wise exact comparisons to google/brotli
However I believe some of the casts you have will error if floatX is defined to one of the types... I think if we want to move forward on this we will need a feature flag to test both floatX settings?
yeah, we definitely need a feature flag for that, but even more importantly we need a CI to catch it all ;)
I just updated the code (added float64 feature)... but guess what - it does not work even in main - so this functionality is broken regardless - not sure if these changes add much more breakage. Perhaps we should merge it and then go back once CI is ready and fix it properly?