Question: Part B Finding the roots to an equation using Newton's Method. Objective of this program is to practice floating point calculations in MIPS. All calculations

Part B
Finding the roots to an equation using Newton's Method.
Objective of this program is to practice floating point calculations in MIPS. All calculations should be done as doubles. Note, that output will not be very eye appealing due to the format when doubles are printed. Don't worry about that.
Newton devised a method to find the/a root to an equation by applying the following formula until the error was sufficiently small.
xn+1=xn-(FxnF'(xn))
Consider a continuous function x3-4x2+1 where its derivative F' is 3x2-8x. Thus, by calculating successive values of x, the value of F(xn) will approach 0, and hence be a root of F.
Write a MIPS program which will find F(xn)=0, to a tolerance of 10-6. Thus, find xn. so that the change of F(xn) is less than 10-6.
To start you should write 2 leaf functions, one which calculates F and the other F'. Prompt the user to enter an initial value for x, hence x1. Then calculate each new x until F(x) is sufficiently close to 0. Try 0.5 as an initial value.
Your program should output x and the value of F(x) for each root that you find. You should try other values for the initial value of x to test your program.
Part B Finding the roots to an equation using

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!