Question: Write and test the square root function in two linked files. Your solution must include a function called sqrt that accepts a 3 2 -
Write and test the square root function in two linked files. Your solution must include a function called sqrt that accepts a bit single precision floating point number in a floating point register and returns its square root as a bit single precision floating point in a different floating point register. Your solution must also include an assembly 'main' program that accepts a float from the user, calls the sqrt function and prints the resulting value. Prompt the user for the input and label your output.
Use Newtons method the socalled "Babylonian" method to compute the square root. If the input argument is negative, return the value NaN.
For this Problem, you cannot use the coprocessor instruction: sqrts or others like it
The program must be written in MIPS
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
