Page 1 of 1

Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Mon Nov 25, 2024 9:04 am
by sagarsarda@gmail.com
See this reddit thread for more details:

https://old.reddit.com/r/factorio/comme ... ctiveness/

It's not a huge deal, but it definitely seems like the UI is wrong that the efficiency is 2.1, it's actually 2.09.

Re: Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Mon Nov 25, 2024 10:16 am
by valneq
Seems like imprecision due to rounding. There is much more severe cases reported here on the forums …

one example being: viewtopic.php?p=624251#p624251
where 0.25 is being rounded to 0.3

Re: Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Mon Nov 25, 2024 11:36 am
by BlueTemplar

Re: Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Thu Nov 28, 2024 11:37 pm
by sp55aa
sagarsarda@gmail.com wrote: Mon Nov 25, 2024 9:04 am See this reddit thread for more details:

https://old.reddit.com/r/factorio/comme ... ctiveness/

It's not a huge deal, but it definitely seems like the UI is wrong that the efficiency is 2.1, it's actually 2.09.
2.1 in computer is exactly 2.0999999046325684, it's truncate to 2.09, not round to 2.10
why use truncate here, not round?

Re: Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Fri Nov 29, 2024 12:09 am
by Rseding91
sp55aa wrote: Thu Nov 28, 2024 11:37 pm 2.1 in computer is exactly 2.0999999046325684, it's truncate to 2.09, not round to 2.10
why use truncate here, not round?
We do not truncate or round. The display value is converted to a string using printf(“%g”, value) and what you see is what you see. The actual beacon computation uses the raw float value, the display shows what it wants to show and it’s not worth the pain and agony to try to make them not show more decimal places.

Re: Epic quality beacon transmission efficiency is 2.09 instead of the reported 2.1

Posted: Fri Nov 29, 2024 5:39 pm
by Muche
Was something like printf("%.3g", value) considered and not used in the end because it created undesired results in other edge cases?