Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

tinab

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?

  • one year ago
  • one year ago

  • This Question is Closed
  1. bwCA
    Best Response
    You've already chosen the best response.
    Medals 1

    2011 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'?

    • one year ago
  2. tinab
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks, 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.

    • one year ago
  3. bwCA
    Best Response
    You've already chosen the best response.
    Medals 1

    using the Decimal clss from the decimal module you can see the actual values http://dpaste.com/810175/ http://docs.python.org/library/decimal.html#decimal-objects

    • one year ago
    • Attachments:

See more questions >>>

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
  • 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.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.