Question: Transcribe this C code to Y86-64 float squareRoot(float n) { /*We are using n itself as initial approximation This can definitely be improved */ float

Transcribe this C code to Y86-64

float squareRoot(float n)

{

/*We are using n itself as initial approximation

This can definitely be improved */

float x = n;

float y = 1;

float e = 0.000001; /* e decides the accuracy level*/

while(x - y > e)

{

x = (x + y)/2;

y = n/x;

}

return x;

}

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 Databases Questions!