Awesome, grumpy covered all of the things I thought of, especially the multiply by 8 beforehand and std::abs().