Square Root
Problem Description:
Write and test the square root function in two linked files.
Your solution must include a function called 'sqrt' that accepts a
32-bit single precision floating point number in register $a0 and
returns its square root as a 32-bit single precision floating point
in $v0. 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 Newton's method to compute the square root. If the input
argument is negative, return the value NaN.
Submit the Following File(s):
sqrt.asm, sqrt_main.asm
Required Input:
A 32-bit single precision floating point number
Required Output:
Your output should look something like the following
example.
Value: 234.56
Square Root: 15.315351775