Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding
#1
I have developed an app, which does lengthy, but not very complicated calculations.
The main thing is that it produces end results, rounded numbers to 2 decimals.
Works well. (On my PC)

I made an executable with pyinstaller : pyinstaller --onefile --windowed xxx.py,
and gave it to somebody else.

With the identical dataset, his results are the same except for the rounding.
I have eg. : 616.51
His PC produces : 616.5199999999999

Am I naive in thinking that an executable should always produce the exact same result als the source?
How can this be ? Huh
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
Rounding - by DPaul - Jul-04-2022, 06:42 AM
RE: Rounding - by Larz60+ - Jul-04-2022, 09:00 AM
RE: Rounding - by Skaperen - Jul-04-2022, 04:46 PM
RE: Rounding - by DPaul - Jul-04-2022, 05:08 PM
RE: Rounding - by Skaperen - Jul-06-2022, 11:41 PM

Forum Jump:

User Panel Messages

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