Python Forum
Python 3- binary math is stupid
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 3- binary math is stupid
#2
I would expect this is a floating point error, where 29.5 - 0.1 is not sufficiently different from 29.4. That doesn't mean it's different math, it just means that different numbers with different floating point approximations are going to trip this off. As always, if you need to be certain use integers and divide, like your third example.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Python 3- binary math is stupid - by FlyingGaijin - Jun-29-2018, 04:56 PM
RE: Python 3- binary math is stupid - by ichabod801 - Jun-29-2018, 07:28 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020