subject
Engineering, 10.11.2019 04:31 abbycrabby

The function sqrt from the header file can be used to find the square root of a nonnegative real number. using newton’s method, you can also write an algorithm to find the square root of a nonnegative real number within a given tolerance as follows: suppose x is a nonnegative real number, a is the approximate square root of x, and epsilon is the tolerance. start with a = x.
a. if |a2 - x| less or equal than epsilon, then a is the square root of x within the tolerance; otherwise:
b. replace a with (a2 + x) / (2a) and repeat step a in which |a2 - x| denotes the absolute value of a2 - x. write a recursive function to implement this algorithm to find the square root of a nonnegative real number. also, write a program to test your function.
turn in your source code file and one or more screen shots showing the results of your testing. after completing this project you will show that you can identify the base case(s) and general case in a recursive algorithm
utilize tail recursion in the construction of a recursive algorithm
construct a recursive algorithm that does not use global variables

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
If a particle moves along a path such that r : (3 sin t) m and ? : 2t rad, where t is in seconds. what is the particle's acceleration in m/s in 4 seconds? a)- 16.43 b)- 16.29 c)- 15.21 d)- 13.79
Answers: 1
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
You are making beer. the first step is filling the glass carboy with the liquid wort. the internal diameter of the carboy is 15 in., and you wish to fill it up to a depth of 2 ft. if your wort is drawn from the kettle using a siphon process that flows at 3 gpm, how long will it take to fill?
Answers: 1
You know the right answer?
The function sqrt from the header file can be used to find the square root of a nonnegative real num...
Questions
question
Mathematics, 21.07.2019 03:31
question
Mathematics, 21.07.2019 03:31
Questions on the website: 13722359