Python Forum
Inclusive (closed) range with float numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inclusive (closed) range with float numbers
#5
Quote:Yes, I am getting an extremely long float at 0.47
Read this page in the python documentation. It is not a limitation of python, it is a limitation of the way computers handle floating numbers (namely the IEEE-754 format)
>>> 0.45 + 0.01 + 0.01
0.47000000000000003
Reply


Messages In This Thread
RE: Inclusive (closed) range with float numbers - by Gribouillis - Apr-27-2019, 09:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python calculate float plus float is incorrect? sirocawa 6 325 Apr-16-2024, 01:45 PM
Last Post: DeaD_EyE
  This result object does not return rows. It has been closed automatically dawid294 6 1,093 Mar-30-2024, 03:08 AM
Last Post: NolaCuriel
  matplotlib x axis range goes over the set range Pedroski55 5 3,233 Nov-21-2021, 08:40 AM
Last Post: paul18fr
  A question about 'Event loop is closed' fc5igm 2 2,232 Oct-05-2021, 02:00 AM
Last Post: fc5igm
  ValueError: I/O operation on closed file problem aliwien 0 2,129 Apr-23-2021, 05:50 PM
Last Post: aliwien
  Run an app in a standalone terminal and wait until it's closed glestwid 2 2,536 Aug-30-2020, 08:14 AM
Last Post: glestwid
  Return prime numbers from range krzyfigh 2 1,936 Apr-20-2020, 08:08 PM
Last Post: krzyfigh
  Define a range, return all numbers of range that are NOT in csv data KiNeMs 18 7,099 Jan-24-2020, 06:19 AM
Last Post: KiNeMs
  Comaparing Float Values of Dictionary Against A Float Value & Pick Matching Key firebird 2 3,406 Jul-25-2019, 11:32 PM
Last Post: scidam
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,757 May-09-2019, 12:19 PM
Last Post: Pleiades

Forum Jump:

User Panel Messages

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