Replaced std::abs by direct computation of absolute value

Necessary because no overloaded version of std::abs
exists for unsigned long long