I have filled a cryogenic plant to the brim with legendary productivity module 3, and selected the promethium science pack as the recipe. I would expect that this results in an output of 2.4/s, as confirmed by FactorioLab, but instead I get:
The numbers for the input are also off -- that should be "0.8", "0.08", and "2", respectively.
Is this just a visual glitch or will this actually run ever so slightly too slow?
[2.0.43] Odd rounding effects in assembly machine crafting speed display
-
- Long Handed Inserter
- Posts: 72
- Joined: Sun Jun 26, 2016 9:37 pm
- Contact:
Re: [2.0.43] Odd rounding effects in assembly machine crafting speed display
Thanks for the report. This is simply how floating point numbers work. After all the math is done, what an infinite fraction system would say ends up as “2” may end up 1.999999998 and when showing the numbers as strings it shows only one decimal place.
If you want to get ahold of me I'm almost always on Discord.
-
- Long Handed Inserter
- Posts: 72
- Joined: Sun Jun 26, 2016 9:37 pm
- Contact:
Re: [2.0.43] Odd rounding effects in assembly machine crafting speed display
Thanks for the reply!
Rounding 1.99999998 to a precision of 2 decimals for display would still end up with 2.0. So it seems to me that either no such rounding happens (just a simple truncation of the string), or the result here would be more like 2.3949999999 which seems surprisingly inaccurate?
Rounding 1.99999998 to a precision of 2 decimals for display would still end up with 2.0. So it seems to me that either no such rounding happens (just a simple truncation of the string), or the result here would be more like 2.3949999999 which seems surprisingly inaccurate?