avoid UB in scalar abs because of signed integer overflow