• anonymous
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
MIT 6.00 Intro Computer Science (OCW)
• Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Looking for something else?

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