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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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