simplify implementation of AbsSqrt()