Newtons method for solving roots takes an estimate of the value of the root and tests it
Question:
Newton’s method for solving roots takes an estimate of the value of the root and tests it for accuracy. If the guess does not meet the required tolerance, it computes a new estimate and repeats. Pseudo-code for using Newton’s method to get the square root of a number is:
function root-by-newtons-method (x, tolerance)
guess := 1;
repeat guess := 1/2(guess + x/guess)
until absolute-value(x − guess * guess) < tolerance Write a recursive LISP function to compute square roots by Newton’s method.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Artificial Intelligence Structures And Strategies For Complex Problem Solving
ISBN: 9780321263186
5th Edition
Authors: George F. Luger
Question Posted: