Add <cmath> to be sure we have std::abs for all the types we care about