Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculation Question.
#1
Hello.

I used Anaconda 3, and I found wrong calculation result.

>>> 4.4 / 100
0.044000000000000004

Is this bug of Python?

Or did I use it wrong?

Please reply. Thanks.
Reply
#2
Floating point in every language I know is an approximation. A very good approximation, but an approximation nonetheless.

https://docs.python.org/3/tutorial/floatingpoint.html
Reply


Forum Jump:

User Panel Messages

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