fixed rounding of sqrt for better performance