2.0.15 - rounding errors?

Bugs that are actually features.
User avatar
irbork
Fast Inserter
Fast Inserter
Posts: 246
Joined: Fri Jul 04, 2014 1:17 pm
Contact:

2.0.15 - rounding errors?

Post by irbork »

There are often imprecise calculations in section multiplier:
1) copy foundry recipe from assembler onto requester chest
2) it requests 187 steel and tungsten plate between others, 112 electronic circuit, 75 refined concrete
3) if you want materials for 1 craft you put into multiplier "1/187*50" which is around 0.267
4) resulted request 50/29/20 (expected 50/30/20)

in addition multiplier shown is 0.3 which should give 56/34/23
after you edit multiplier to get 10 times the request "0.3*10" you get 561/336/225 (expected 500/300/200)

multiplier needs higher precision in the edit box, or requester copied requests need to use round multipliers not to deal with fractions
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3758
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: 2.0.15 - rounding errors?

Post by boskid »

Thanks for the report however item requests are always integers and as such they have to be rounded when copying settings from assembler to a requester chest. Rounding a number, then multiplying and then rounding again is not guaranteed to produce exact numbers. If you need exact numbers, just set exact numbers instead of expecting game will do it for you, especially when there are layers of numbers rounding.
Post Reply

Return to “Not a bug”