Correct abs function should be used (clang -Wabsolute-value)