The function calculates and returns the square root of x given the eps without using the built-in sqrt function.