• anonymous
shiroo:I am not understanding epsilon and numguesses please help.
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
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.
  • chestercat
I got my questions answered at in under 10 minutes. Go to now for free help!
  • harsimran_hs4
epsilon is generally used to depicit the level of accuracy you want in your answer..... consider a statement in program to find square root if mod(x - (ans*ans)) <= epsilon: this means that the answer you require is such that it no more or less that epsilon from the actual answer one important thing doing ans*ans == x is a bad thing because when you increment what you expect from normal mathematics or rather number system , the computer may have a slightly different representation for eg. 0.1 is not exactly 0.1 for the computer so we always introduce some term such as epsilon that will determine the level of accuracy we want in our answer as regaring numguesses it`s just number of guesses you made to get to your answer in sqrt program it`s simply the number of iterations of the while loop hope you got your answer if still any doubt please do ask.....
  • anonymous
when working with floating point numbers, you will not get an exact result. using a tolerance with numeric comparisons will allow you to compensate for that. you need to choose the tolerance based on your accuracy needs. in this case epsilon is the variable for this tolerance.

Looking for something else?

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