[2.0.15] Output calculation slightly off using modules

Things that we don't consider worth fixing at this moment.
Sarion
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 15, 2024 8:07 pm
Contact:

[2.0.15] Output calculation slightly off using modules

Post 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 560 times
grafik.png
grafik.png (76.26 KiB) Viewed 560 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 560 times
grafik.png
grafik.png (84.18 KiB) Viewed 560 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
Attachments
grafik.png
grafik.png (166.12 KiB) Viewed 560 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15848
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.15] Output calculation slightly off using modules

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't fix.”