Newton-Raphson method for calculating square root of a number.