Change <cmath> include to <cstdlib> for proper std::abs resolution.