Minor: excessive recipe time precision?
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Minor: excessive recipe time precision?
This is a niggle and not really an interface request, so sue me, can't find a better place to put it.
Everywhere else - where admittedly space is more constrained - precision is rounded to something like four significant figures, or four printed characters including SI unit suffixes, or one decimal place, or something. (This occasionally results in averaged recipe products being displayed as 0.2 when it's really 0.25 but that's another story.)
When the base belt speed got buffed to 15 item/s in 0.17, some mods which pay a lot of attention to optimising belt compression ratios end up with a lot of crafting times that have a recurring decimal. So you can end up with whole pages of recipes like the thing below.
Is there are a need for that much precision? It's ... confusing. But I have no control over it.
Would it break anything if recipe crafting times were rounded to something easier on the eye? Arguably, 2.67 seconds would be just as informative, and less off-putting.
Cheers
Everywhere else - where admittedly space is more constrained - precision is rounded to something like four significant figures, or four printed characters including SI unit suffixes, or one decimal place, or something. (This occasionally results in averaged recipe products being displayed as 0.2 when it's really 0.25 but that's another story.)
When the base belt speed got buffed to 15 item/s in 0.17, some mods which pay a lot of attention to optimising belt compression ratios end up with a lot of crafting times that have a recurring decimal. So you can end up with whole pages of recipes like the thing below.
Is there are a need for that much precision? It's ... confusing. But I have no control over it.
Would it break anything if recipe crafting times were rounded to something easier on the eye? Arguably, 2.67 seconds would be just as informative, and less off-putting.
Cheers
Re: Minor: excessive recipe time precision?
When seeing 2.67 i'm more inclined to think it is 2.67 and not 2 2/3Deadlock989 wrote: Mon Jun 03, 2019 6:02 pm Arguably, 2.67 seconds would be just as informative, and less off-putting.
2.667 is probably the point where i go: ah yeah, 2 2/3
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
There is probably a whole field of psychonumerics or whatever which studies how people from different cultural backgrounds and education levels respond to this kind of shizzle but yeah, let's not go there.Choumiko wrote: Mon Jun 03, 2019 6:12 pmWhen seeing 2.67 i'm more inclined to think it is 2.67 and not 2 2/3
2.667 is probably the point where i go: ah yeah, 2 2/3
I agree that 2.667 is less depressing than 2.66667. I'd prefer 2.67 but literally anything other than 2.66667 would do me
Re: Minor: excessive recipe time precision?
If I use "the same format as most stuff" and round instead of floor, you get this:
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Minor: excessive recipe time precision?
Yeah please make it 2.666667!Deadlock989 wrote: Mon Jun 03, 2019 6:30 pm I'd prefer 2.67 but literally anything other than 2.66667 would do me
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
I can't round or floor because these crafting times are deliberately calculated to produce output which is perfectly compressed on the respective belt when produced by machines with a nice round crafting speed. I can move the recurring decimals from place to place but the least annoying way is to have them in the recipes.Bilka wrote: Tue Jun 04, 2019 2:30 pm If I use "the same format as most stuff" and round instead of floor, you get this:
0.16's belt speeds didn't produce these kinds of recurring decimals because belt speeds didn't involve factors of 15.
Re: Minor: excessive recipe time precision?
I'm not telling you to round or floor. I'm just showing you what "use the same number format as the rest" means for the display of your recipe time.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
OK, I misunderstood.Bilka wrote: Tue Jun 04, 2019 2:36 pm I'm not telling you to round or floor. I'm just showing you what "use the same number format as the rest" means for the display of your recipe time.
That's an improvement from my perspective. I'm sure someone else hates it.
Re: Minor: excessive recipe time precision?
As I mentioned in this thread, "the same number format as the rest" should really use 2 decimal places for numbers less than 10.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
Agreed. It would fix both issues at once (recipes times with excessively accurate recurring decimals, and overly-rounded fractional products).DaveMcW wrote: Tue Jun 04, 2019 2:40 pm As I mentioned in this thread, "the same number format as the rest" should really use 2 decimal places for numbers less than 10.
Re: Minor: excessive recipe time precision?
If i may, my 2 cents are that it should read "2.6..." for anything recurring. That is, it detects if there are more than 3 or 4 decimal places and rounds it to the first recurring decimal and puts dots after.
Examples:
Recurring decimals
Actual value: 1.3333333333333333333333333333333333
Display: 1.3...
Non recurring decimals
Actual value: 0.015625
Display: ~0.0156
Recurring decimals after some point
Actual value: 0.013333333333333333333333333333333333
Display: 0.013...
Extreme case (Notice that the 4th decimal isn't recurring and so there is no recursion indicator.
Actual value: 0.0013333333333333333333333333333333333
Display: ~0.001
Odd case (Because it's not recurring to the end)
Actual value: 2.66666666666666666666666666666123
Display: ~2.6666
That would be better IMHO.
EDIT: I said "rounds" but i meant "floor".
And sure, internally you'd have to find out where the precision for 1/3 ends too.
Say the actual value is 0.333333333333333333333333333334
Then you would check for recursion up until the tenth decimal or something so you don't get "~0.3333" instead of "0.3333..."
Examples:
Recurring decimals
Actual value: 1.3333333333333333333333333333333333
Display: 1.3...
Non recurring decimals
Actual value: 0.015625
Display: ~0.0156
Recurring decimals after some point
Actual value: 0.013333333333333333333333333333333333
Display: 0.013...
Extreme case (Notice that the 4th decimal isn't recurring and so there is no recursion indicator.
Actual value: 0.0013333333333333333333333333333333333
Display: ~0.001
Odd case (Because it's not recurring to the end)
Actual value: 2.66666666666666666666666666666123
Display: ~2.6666
That would be better IMHO.
EDIT: I said "rounds" but i meant "floor".
And sure, internally you'd have to find out where the precision for 1/3 ends too.
Say the actual value is 0.333333333333333333333333333334
Then you would check for recursion up until the tenth decimal or something so you don't get "~0.3333" instead of "0.3333..."
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
That's a Western maths convention which I don't think is inherently meaningful to everyone. Way too complex.Cadde wrote: Tue Jun 04, 2019 2:58 pm If i may, my 2 cents are that it should read "2.6..." for anything recurring. ...
Rounding numbers consistently in different tooltips, without too much or not enough accuracy, is what we're after. The dot dot dot notation wouldn't fit into some places, e.g. recipe products.
Re: Minor: excessive recipe time precision?
Test this lua code in the in-game console:Cadde wrote: Tue Jun 04, 2019 2:58 pm Odd case (Because it's not recurring to the end)
Actual value: 2.66666666666666666666666666666123
Display: ~2.6666
Code: Select all
/c
x = 1/3 * 10^9
x = x - math.floor(x)
game.print(x)
Code: Select all
0.33333331346512
Or how about 0.1 * 1000 (+0.1 a thousand times)?
Code: Select all
/c
x = 0
for i = 1, 1000 do
x = x + 0.1
end
game.print(x)
You don't have the same repeating numbers in binary as in decimal. You can't store 1/3 in a binary float or double, so it is rounded to the nearest representable number. You can't store 0.1 either and it's not even a repeating decimal in base 10, because it is in binary! And then it gets rounded when printed again
Edit: You ninja edited your post
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: Minor: excessive recipe time precision?
I know qon, the point is what's important. Not the inner mechanics of IEEE 754
Re: Minor: excessive recipe time precision?
For the next version, I introduced a new format that shows up to 2 decimals, we needed it somewhere else anyway. So, this is how things look like now:
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Minor: excessive recipe time precision?
That'll do me nicely. I and my failing retinas thank you.Bilka wrote: Tue Jun 04, 2019 8:23 pm For the next version, I introduced a new format that shows up to 2 decimals, we needed it somewhere else anyway. So, this is how things look like now: