fast implementation of absolute value