A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 4 years ago
I'm trying to complete the third problem on Problem set one however I don't understand bisection search. Does it always need to have a epsilon? Also I finally looked at the solution after a few hours of trying and it does not work either, is it impossible?
anonymous
 4 years ago
I'm trying to complete the third problem on Problem set one however I don't understand bisection search. Does it always need to have a epsilon? Also I finally looked at the solution after a few hours of trying and it does not work either, is it impossible?

This Question is Closed

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.02011 class?? typically the problemsets have you use 'epsilon' when working with floating point numbers  when comparing numbers that are the result of floating point calcs there are inherent errors that need to be accounted for  those calcs might not produce a value that you expect and so may not compare the way you want them to. you need to set a tolerance. bisection is an algorithim that reduces the problem (or search space) by 1/2 on each iteration. did you watch the lecture and read the readings and try out the examples from the lectures? what exactly don't you 'get'?

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0Thanks, I did read the readings and watch the lectures. I apparently was not understanding the need for an epsilon, the moment I added one in the code works fine. I guess I hit a silly level of frustration and didn't think about inherent errors.

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0using the Decimal clss from the decimal module you can see the actual values http://dpaste.com/810175/ http://docs.python.org/library/decimal.html#decimalobjects
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.