Define the divide-and-average algorithm

Assignment Help Computer Engineering
Reference no: EM1328423

The divide-and-average algorithm for approximating the square root of any positive number a is as follows: Take any initial approximation x that is positive, and then find a new approximation by calculating the average of x and a/x, that is, (x + a/x)/2. Repeat this procedure with x replaced by this new approximation, stopping when x and a/x differ in absolute value by some specified error allowance, such as 0.00001. Write a program that reads values for x, a, and the small error allowance and then uses this divide-and-average algorithm to find the approximate square root of x. Execute the program with a=3 and error allowance=0.00001, and use the following initial approximationa: 1, 10, 0.01, and 100. Also execute the program with a=4, errow allowance=0.00001, and initial approximations 1 and 2.

Reference no: EM1328423

Questions Cloud

Description of present value and future value : The shorter the length of time between present value and its corresponding future value, the lower present value, relative to future value, true of false?
Evaluate the on-going progress of the change effort : The solution thoroughly addresses each question, utilizing a call center work environment as example. Included are potential  measurements, both quantitative and qualitative, for measuring change efforts with these job duties.
What do you meant by operations management : What do you meant by operations management? Why is it important? Is a good knowledge of operations management more important in service or manufacturing industries? Explain your answer.
Motive carry greater weight on ethical scales : Should motive or conduct carry greater weight on the ethical scales in this situation?
Define the divide-and-average algorithm : The divide-and-average algorithm for approximating the square root of any positive number a is as follows: Take any initial approximation x that is positive, and then find out a new approximation by calculating the average of x and a/x, that is, (..
Assistance on supply chain management paper : Requesting assistance on Supply Chain Management Paper - Background: elucidate the current situation and context - tell about the campaign and what it was supposed to do and why you were assigned and Strategy
Determining present value and future value : You have just received a windfall from an investment you made in a friend's business. What is the present value of your windfall? What is the future value of your windfall in three years (on the date of the last payment)?
About the equitably toll : An attorney failed to file his client's EEO case within the 90-day required period.
Assume that the price elasticity of demand for good : Assume that the price elasticity of demand for good. Describe how much consumption changes.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Technology assumption and analyzing the system

Which businesses and services would no longer be required if the perfect technology assumption were a reality for automobile? Explain how does the perfect technology assumption help with analyzing the system?

  Detail advantages of looping

Detail advantages of looping

  How to compare and contrast the two systems

In San Jose, CA, Riordan Manufacturing Company is in the procedure of upgrading all computers. Windows 2K is the network operating system. IT has decided to upgrade the network operating system, and your team is tasked with evaluating both Windows..

  Define the way for creating work breakdown structure

Define the way for creating work breakdown structure Use a hypothetical project to illustrate your understanding of the WBS.

  Organization to consolidate servers

Utilizing any organizational model from your experience and or research, describe the pros and cons of this organization in order to consolidate the servers and to relocate the primary data centers.

  The importance of the common protocol (tcp/ip)

how the other future communication needs may or may not continue this dependence.

  Express a mechanism to access the telephone customer

express a mechanism to access the telephone customer.describe your selection and discuss the speed of the search operation. Keep in mind that a million records cannot be kept in one array. There is no need to code in C++.

  Arrays and control structures important tools in programming

Arrays and control structures important tools in programming.

  Ssl protection

Explain whether pages are served over the SSL protected from problem you explained. If so, explain why; if not, explain why not.

  Design and develop a program that creates a complete set

Design and develop a program that creates complete set of multiplication tables where both the multiplicand and the multiplier vary from 1 through 12. The table should display as 144 rows in the list view control.

  Find out coding of binary information and error detection

find out Coding of Binary Information and Error Detection.

  Reverse polish notation

Transform the following numerical arithmetic expression into the reverse Polish notation and display the stack operations in order evaluate the numerical result.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd