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

Insight Group Title

I am new to this course. In lecture 4 at 6:28, I am using Python 2.7.3, when I enter x = 0.1, when I enter x, my answer is what I expect, 0.1, not the .100000000000000001 answer on the video. Is it simply because I am using this version?: Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 I ask because I worry when I get something different and don't know why.

  • one year ago
  • one year ago

  • This Question is Closed
  1. Insight Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    I found the answer myself from looking at the link http://docs.python.org/2/tutorial/floatingpoint.html#tut-fp-issues clipped from the bottom, which precisely answers my question: meaning that the exact number stored in the computer is approximately equal to the decimal value 0.100000000000000005551115123125. In versions prior to Python 2.7 and Python 3.1, Python rounded this value to 17 significant digits, giving ‘0.10000000000000001’. In current versions, Python displays a value based on the shortest decimal fraction that rounds correctly back to the true binary value, resulting simply in ‘0.1’.

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