Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 1. On slide 11 of the file MIT6_0001F16_Lec1 , we discussed about an algorithm to compute the exact square root of a number. With

Python

1. On slide 11 of the file MIT6_0001F16_Lec1, we discussed about an algorithm to compute the exact square root of a number. With an initial guess, compute the exact square root of the following numbers:

a) 280

b) 179

c) 321

Make sure that the guesses which you give are not closer than 10%. Of the individual numbers in a), b) c). Find how many iterations you need to arrive at the exact square root. Also find out if any of the square root computations may diverge (you need infinite number of iterations or you may not arrive at the exact square root and may go off-track).

image text in transcribed

A NUMERICAL EXAMPLE square root of a number x is y such that y*y = x recipe for deducing square root of a number x (16) 1) Start with a guess, g 2) If g*g is close enough to x, stop and say g is the answer 3) Otherwise make a new guess by averaging g and x/g 4) Using the new guess, repeat process until close enough g*g |xlg (g+x/g)/2 9 4.17 4.17 17.36 3.837 4.0035 4.0035 16.0277 3.997 4.000002 3 16/3 6.0001 LECTURE 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions