Page 1 of 1

[2.0.15] Output calculation slightly off using modules

Posted: Fri Nov 15, 2024 8:24 pm
by Sarion
What did you do?
The base production get calculated wrong in the game when it comes down to speed modules. Tested it in Assembler 3 and in Chemical Plants with 4 Speed modules and the receipe for batteries and for Laser Turrets
grafik.png
grafik.png (83.01 KiB) Viewed 571 times
grafik.png
grafik.png (76.26 KiB) Viewed 571 times
I put speed modules lv1 in the chemical plant to produce batteries. 2 in a Beacon and one in the chemical plant itself. That should be because of the beacon distribution efficiency 4 speed modules. So 0,25 * 1,8 = 0,45.
Another example is, that i put down 4 speed modules lv1 into the laser turret Assembler (3) that have a batterie input of 0,75 * 1,8 = 1,35

What happened?
grafik.png
grafik.png (93 KiB) Viewed 571 times
grafik.png
grafik.png (84.18 KiB) Viewed 571 times
In the chemical plant the output of batteries should be 0,45/s but is now 0,44/s
In the assembler the input should be 1,35/s but is now 1,34/s

What did you expect to happen instead? It might be obvious to you, but do it anyway!
I expected to be 80% more output and not 76% by the Chemical Plants and 78% at the Assembler

Does it happen always, once, or sometimes?
Always

Re: [2.0.15] Output calculation slightly off using modules

Posted: Sun Nov 24, 2024 12:09 am
by Loewchen
Ref.: 122684

Re: [2.0.15] Output calculation slightly off using modules

Posted: Tue Feb 18, 2025 3:34 pm
by Rseding91
Thanks for the report. I don't believe we will be doing anything about this. At some point the floating point number is converted into a string and if it's 1.499999996 the string conversion outputs 1.4. It's time consuming, error prone, and impractical to try to make all of these conversions work "correctly" (because there is no objective correct rounding direction). So for now, this is what it is. Maybe in the future someone will change it to round up, and then someone will complain 1.3000000001 shows 1.4 and start the whole process over again.