I am stuck on hand out 3 on an example using bisection search to find the square root of x (x=25).
My issue:
On the fourth iteration of the problem with x =25, low = 0, high = 6.25, ans = 3.125.
3.125*3.125 = 9.76 which is < 25. So now low = 3.125 and high =6.25.
In the problem if ans*ans < x, low = ans. if ans*ans > x, high = ans.
If both low and high map to same ans, how is it that in iteration 4 above that low = 3.125 and high = 6.25?
More basic, why is there a local and global variable that are the same?
Thanks!
http://pastebin.com/i9BysyyQ

See more answers at brainly.com

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.