[0.15.29] personal solar panel value wrong

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
rorror
Fast Inserter
Fast Inserter
Posts: 241
Joined: Fri Nov 21, 2014 9:02 pm
Contact:

[0.15.29] personal solar panel value wrong

Post by rorror »

When you have 16 Personal solars, x 10kw = 160kw, this is ok.
total_kw_is_good.PNG
total_kw_is_good.PNG (167.17 KiB) Viewed 2088 times
When you have 17 Personal solars, x 10kw = 159kw, this is wrong. 1kw is missing?
this happens for, 17 to 28, (1kw missing) and at 29solar panels or higher, the amount is shown right again. (Did not test any higher.
total kw not good.PNG
total kw not good.PNG (207.23 KiB) Viewed 2088 times
Also tested this with mods disabled.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.15.29] personal solar panel value wrong

Post by kovarex »

This almost looks like floating point precision bug.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.29] personal solar panel value wrong

Post by Rseding91 »

kovarex wrote:This almost looks like floating point precision bug.
It is, the value is not an exact integer and the display converts it to an integer value to be shown.
If you want to get ahold of me I'm almost always on Discord.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: [0.15.29] personal solar panel value wrong

Post by Engimage »

So using round() instead of trunc() might fix the issue?
Post Reply

Return to “Minor issues”