pub fn reverse_index(i: usize, size: u64) -> usize {
    if size == 1 {
        i
    } else {
        i.reverse_bits() >> (usize::BITS - size.trailing_zeros())
    }
}
Reverses the `log2(size)` first bits of `i`
crates/math/src/fft/cpu/bit_reversing.rs