Write a function to determine the squareroot of a number

Assignment Help Computer Engineering
Reference no: EM132135991

Question : squareroot

Write a function to determine the squareroot of a number.

The squareroot of a number can be approximated by repeated calculation using the formula

NG = 0.5(LG + N/LG)

where NG stands for the next guess and LG stands for the last guess.

The loop should repeat until the difference between NG and LG is less than 0.00001.

Use an initial guess of 1.0. Write a driver program to test your squareroot function.

Reference no: EM132135991

Questions Cloud

Does there always exist a perfect matching with no strong : Does there always exist a perfect matching with no strong instability? Does there always exist a perfect matching with no weak instability?
Eliminate the problem and turn the initiative into a success : Explore and elaborate on this reason for failure. Provide a solution that will eliminate the problem and turn the initiative into a success
Write a program that lets the user enter the initial height : Write a program that lets the user enter the initial height of the ball and the number of times the ball is allowed to continue bouncing.
Write function called closer_root that takes two numbers : Write another function called closer_root that takes two real numbers and returns the one whose square root is closer to the number 10.
Write a function to determine the squareroot of a number : Write a function to determine the squareroot of a number. The squareroot of a number can be approximated by repeated calculation using the formula.
Size of accounts receivable : Its accounts are, on average, four days past due. If annual credit sales are $9.75 million, what is the company's balance sheet amount in accounts receivable?
Discuss the need for open systems communication : There are standards in network communication through which data is transferred from one system to another.
Design and code your own lifo stack using single liked list : Design and code your own LIFO Stack using single liked list to hold a list of integers. Use the C++ "struct" structure to create your SLL nodes.
Provide story boards illustrating the user interface : 7002ICT - Systems Development - Provide story boards illustrating the user interface for at least four (4) screens. Discuss how you have applied best-practice

Reviews

Write a Review

Computer Engineering Questions & Answers

  What would the result of the syntax

What would the result of the syntax.

  How an error occurs in the transmission of a block

The cipher block chaining (CBC) mode has the property that it recovers from errors in cipher text blocks. Show that if an error occurs in the transmission of a block , but all the other blocks are transmitted correctly, after that this affects onl..

  Draw the result of inserting entries with the given keys

Consider the sequence of keys (5,16,22,45,2,10,18,30,50,12,1). Draw the result of inserting entries with these keys into an initially empty (2,4) tree.

  What is the level of equilibrium income

Suppose that the behavior of households and firms in an economy is determined by the following equations.

  Find out the occurrences of three consecutive characters

Find out the occurrences of three consecutive and identical word characters (like aaa or bbb) using grep and sed.

  Explain the term low-order memory interleaving

Explain the terms Low-order memory interleaving, physical address cache versus virtual address cache and atomic versus non-atomic memory accesses.

  Analyze the characteristics of elastic traffic

Analyze the characteristics of elastic traffic to determine why this is used on the Internet. Provide three examples of inelastic traffic not discussed.

  Design a combinational verilog module

The starter code from the course web page includes test benches for each problem below. For each of the following, please submit the source code for your Verilog module along with a printout or screen capture of waveform plots indicating a success..

  Would it always be the result of one''s experience

How do you envision the ways program verification and performance tuning will be accomplished in the future? Will it still be a work of art? Will it always be the result of one's experience? Or do you forecast more and more automatic ways (algorit..

  What is the minimum fraction of each block

Describe a modified version of the B-tree insertion algorithm. What is the minimum fraction of each block that will always be filled using this scheme?

  Under what circumstances do page faults occur

Under what circumstances do page faults occur? Describe in detail the actions taken by the operating system when a page fault occurs. When a process ?rst starts execution, how would you characterize the page-fault rate?

  Problem 1provide a listing of your code and comparison of

problem 1provide a listing of your code and comparison of the results from your code for cl cd cdf cdp and cmc4 with

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