Python Forum
python calculate float plus float is incorrect?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python calculate float plus float is incorrect?
#2
It is all explained here. Also it has nothing to do with Python. It's due to the internal representation of floating point numbers by computers. The same issue exists in other programming languages.
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
RE: python calculate float plus float is incorrect? - by Gribouillis - Apr-16-2024, 09:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python code to calculate mean of an array of numbers using numpy viren 3 211 May-29-2024, 04:49 PM
Last Post: Gribouillis
  Code is returning the incorrect values. syntax error 007sonic 6 1,419 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  Formatting float number output barryjo 2 1,019 May-04-2023, 02:04 PM
Last Post: barryjo
  convert string to float in list jacklee26 6 2,058 Feb-13-2023, 01:14 AM
Last Post: jacklee26
  TypeError: 'float' object is not callable #1 isdito2001 1 1,182 Jan-21-2023, 12:43 AM
Last Post: Yoriz
  Write Null values as 0.0 (float) type in csv mg24 3 1,508 Dec-07-2022, 09:04 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable TimofeyKolpakov 3 1,677 Dec-04-2022, 04:58 PM
Last Post: TimofeyKolpakov
  openpyxl convert data to float jacklee26 13 6,497 Nov-19-2022, 11:59 AM
Last Post: deanhystad
  Convert SQLite Fetchone() Result to float for Math Extra 13 3,864 Aug-02-2022, 01:12 PM
Last Post: deanhystad
  float("{:.2f}" return long number? korenron 2 1,164 Jul-13-2022, 05:35 AM
Last Post: korenron

Forum Jump:

User Panel Messages

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