Page 1 of 1

Bad rounding errors in every number ingame [Please fix!]

Posted: Sat May 06, 2017 8:17 pm
by Distelzombie
Hi there,


because I am testing stuff from time to time I always hit a wall with the numbers ingame and have to find ways around it to still get accurate results.
If it is counting items with combinators, measuring energy consumption or anything else involving numbers when units or the decimal place change. Its really horrible.

To visualize this problem I build a setup that consists of two seperate power networks. They can be connected with a switch to make them one.
If I arrange the power consumption in the right side to a value-shift (999kW to 1MW or 9.9MW to 10MW) I can add a certain amount of buildings on the other side that are basically "invisible" in power statistics menu.
The left side is the one that's "invisible" if connected to the right and the right gives the base-consumption.
Left side = 99.9MW
Right side = 1.0GW
I tried to get the comsumption on the right side to almost a perfect 1.0GW and on the right side to 99.9MW. That's why there are several different buildings.

Again its just to easily spot the problem. This error is in all numbers when units or the decimal place change

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Sun May 07, 2017 5:49 pm
by Smarty
moved to bug reports

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Sun May 07, 2017 6:01 pm
by Rseding91
The electric usage statistics are averages. They're not exact numbers so the over-time values will not be exact.

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Sun May 07, 2017 6:11 pm
by Distelzombie
Rseding91 wrote:The electric usage statistics are averages. They're not exact numbers so the over-time values will not be exact.
I dont really understand your point here. As I said in every number when the unit or the decimal place change there will be a certain HUGE amount that is not shown. This does really interfere with testing or anything... I cant rely on anything the game tells me.
I would love to have at least 3 decimals and a correct rounding that works like you learned irl: 0.499 = 0 and 0.500 = 1 ... and not like it is rihgt now: 0.999 = 0 and 1.000 = 1

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Mon May 08, 2017 2:33 am
by Jetroid
Uhm, 0.999 would equal 0.9, not 0.

But I agree, it would be nice to have a nicer way to count numbers of things. I was recently trying to build a huge solar array, and was dissapointed to see that my blueprint just counted to 1.0k solar panels after I hit that threshold. It'd be nice to be able to turn on an exact numbers mode, similar to how ALT shows more detail on directions are being faced.

(For those wondering, you can count specific items by deconstructing using bots and seeing how many they put away, was able to create a nice 5 roboport blueprint with only 2 extra solar panels above the 0.84 ratio)

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Mon May 08, 2017 2:50 am
by AndrewIRL
Jetroid wrote:Uhm, 0.999 would equal 0.9, not 0.

But I agree, it would be nice to have a nicer way to count numbers of things. I was recently trying to build a huge solar array, and was dissapointed to see that my blueprint just counted to 1.0k solar panels after I hit that threshold.
Measuring in GW his example is left = 0.0999 GW and the right = 0.999 GW

The left side shows production of 1.0GW when used alone (rounded up) and the left side shows 0.999GW. When they are added together the expected sum is 0.999 + 0.0999 = 1.0989 rounded up to 1.1 GW. But instead, as his final screenshot shows, the number is rounded down to 1.0 GW for production but oddly 1.1GW for satisfastion (see LHS of last screenshot). So the calculation is performed differently for different parts of the same screen!

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Mon May 08, 2017 5:19 pm
by Distelzombie
Jetroid wrote:Uhm, 0.999 would equal 0.9, not 0.
Not in the framework i used there:
0.499 = 0 and 0.500 = 1 ... and not like it is right now: 0.999 = 0 and 1.000 = 1
If you would round up to full integers it would show 0. (Using the logic the game has right now)
It'd be nice to be able to turn on an exact numbers mode
Thats a good idea. But you could have always on anyway. Its not even an issue with space: Sometimes there are 3 numbers.
------------------------------------
The smallest bit of accuracy should be three decimals. (I mean: 1.234) Because number get really big pretty fast.
1.0 GW for production but oddly 1.1GW for satisfastion
Oh I didnt see that.

Anyway to proof its in every number:
This picture shows a chest with 1,099 copper wires. As you can see on the right when I hover over the chest it only shows 1.0k. This number would also show up if I read the contents using networks. Thats what makes tests that count items really inaccurate.

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Mon May 08, 2017 5:32 pm
by Distelzombie
And to prove it is happening with networks:

Requesterchests have exactly 10k copper wire in them. The other chest has exactly 999 copper wire. (As you can see on the powerpole.)
Combined is that still 10k. (As you can see on the combinator)

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Mon May 08, 2017 6:54 pm
by Rseding91
Yes, display values are rounded down - that's intended. The actual signal value is the exact amount - you can run a condition against it and see for yourself.

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Tue May 09, 2017 12:17 pm
by Distelzombie
Rseding91 wrote:Yes, display values are rounded down - that's intended. The actual signal value is the exact amount - you can run a condition against it and see for yourself.
Yes I know that. But if you yourself want to see the numbers they're all wrong. Also you can't work with number in the power menu using combinators.
Why do they round down when it is 0.99? This makes no sense. It should round down when it's 0.49 and round up when it's 0.50.
I can't even see if my factory uses 12.0 petawatt or 12.1! That's a difference of 100 terawatt! That's like a hundred factorys! The higher the number the worse it gets.

For a game that's essentially made for programmers, network guys or any other profession that needs logical thinking, this really is a no-go.

You could include a switch in options to change to scientific notation or simply add a bunch of decimals. At least do something to reduce the rounding errors, please. :(
You guys are doing a great job, nonetheless! :)

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Tue May 09, 2017 1:16 pm
by steinio
Related since 04/2016: viewtopic.php?f=11&t=24558

May i kindly ask, what this is:
Klonan wrote:There is a solution in 0.15,
So you will have to trust us until then, that it is the right move
Still an amazing game.

Greetings, steinio.

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Tue May 09, 2017 1:45 pm
by Distelzombie
steinio wrote:Related since 04/2016: viewtopic.php?f=11&t=24558

May i kindly ask, what this is:
Klonan wrote:There is a solution in 0.15,
So you will have to trust us until then, that it is the right move
Still an amazing game.

Greetings, steinio.
I dont see how this is related. Your problem has probably been fixed when they multiplied all fluids by ten, and my problem got worse.

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Wed May 10, 2017 1:25 pm
by rorror
The rounding error annoyed me for quite a while(years). You got my vote for the "Please Fix Campain".

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Sun Mar 01, 2020 7:28 pm
by sarcolopter
Any progress on this?

Re: Bad rounding errors in every number ingame [Please fix!]

Posted: Sun Mar 01, 2020 8:43 pm
by Rseding91
sarcolopter wrote:
Sun Mar 01, 2020 7:28 pm
Any progress on this?
No, because it's not a bug; and that's why this is in "Not a bug"; we aren't working on it because there's nothing to work on :P