Improved performance of sqrt