Question: this is in java! please provide 2 main method testing for this function 5. The following method was known to the ancient Greeks for computing

this is in java! please provide 2 main method testing for this functionthis is in java! please provide 2 main method testing for this

5. The following method was known to the ancient Greeks for computing square roots. Given a value (a+e) x > 0 and a guess g for the square root, a better guess is. Write a recursive helper method squareRootGuess(double x, double g). If g2 is approximately equals to x (within .0001 of x) return g, otherwise, keep going until you get a better guess. Then write a method squareRoot(double x) that uses the helper method. You cannot use Math.sqrt() in solving this problem. Hint: if this method really works, does it matter what the initial guess is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!