what is the maximum value of the digits

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

what is the maximum value of the digits

Post by Airat9000 »

14G to moment

example
Скриншот 29-01-2023 135225.jpg
Скриншот 29-01-2023 135225.jpg (176.67 KiB) Viewed 4079 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: what is the maximum value of the digits

Post by Rseding91 »

kilo=k 1'000
mega=M 1'000'000
giga=G 1'000'000
tera=T 1'000'000'000
peta=P 1'000'000'000'000
exa=E 1'000'000'000'000'000
zetta=Z 1'000'000'000'000'000'000
yotta=Y 1'000'000'000'000'000'000'000
If you want to get ahold of me I'm almost always on Discord.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: what is the maximum value of the digits

Post by Airat9000 »

Rseding91 wrote: Sun Jan 29, 2023 5:54 pm kilo=k 1'000
mega=M 1'000'000
giga=G 1'000'000
tera=T 1'000'000'000
peta=P 1'000'000'000'000
exa=E 1'000'000'000'000'000
zetta=Z 1'000'000'000'000'000'000
yotta=Y 1'000'000'000'000'000'000'000
thanks in

there will be no counting above this number? :D
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: what is the maximum value of the digits

Post by FuryoftheStars »

To know the max number, just look up "max 64 bit integer".

Depending on if they are using signed or unsigned there, it's either going to be a little more than 9E or 18E, respectively.

https://developers.google.com/discovery ... inclusive).
Last edited by FuryoftheStars on Wed Feb 01, 2023 2:28 pm, edited 1 time in total.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: what is the maximum value of the digits

Post by Rseding91 »

FuryoftheStars wrote: Wed Feb 01, 2023 12:14 pm To know the max number, just look up "max 64 bit integer".

Depending on if they are using signed or unsigned there, it's either going to be a little more than 9T or 18T, respectively.
It depends on which statistics are being used; fluids use 'double' and things like items use an unsigned 64 bit number.

unsigned 64 bit goes up to 18,446,744,073,709,551,615 which is 18 "E"

double depends on the amount of precision but goes *way* beyond "Y"
If you want to get ahold of me I'm almost always on Discord.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: what is the maximum value of the digits

Post by FuryoftheStars »

Rseding91 wrote: Wed Feb 01, 2023 1:55 pm unsigned 64 bit goes up to 18,446,744,073,709,551,615 which is 18 "E"
Derp. Thanks for pointing that out. On my mobile, it was cutting some of the text off (perfectly at one of the commas, even), so I didn't realize I wasn't looking at the full number, there.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
User avatar
TheKillerChicken
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Mar 02, 2019 7:06 am
Contact:

Re: what is the maximum value of the digits

Post by TheKillerChicken »

I noticed that even though 64 bit can go up to 1 decellion, my stacks on items can only go up to 4.2 billion. What is weird is I modified a fluid storage which can store up to 1 million Yotta. Are fluids handled differently than stackable items?
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: what is the maximum value of the digits

Post by FuryoftheStars »

TheKillerChicken wrote: Mon Feb 06, 2023 4:22 am I noticed that even though 64 bit can go up to 1 decellion, my stacks on items can only go up to 4.2 billion. What is weird is I modified a fluid storage which can store up to 1 million Yotta. Are fluids handled differently than stackable items?
Item stacks are unsigned 32 bit integers. That means they max out at just shy of 4.3 billion (which the game will happily show as 4.2B).
Fluids are double. So as Rseding91 mentioned, it is possible for these to be able to go to Yotta and beyond.
The data points shown in the graphs (what the OP was asking about) are (most likely) a mixture of double (fluids) and either signed or unsigned (depending on if it can negative or not) 64 bit integers (everything else).
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
User avatar
TheKillerChicken
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Mar 02, 2019 7:06 am
Contact:

Re: what is the maximum value of the digits

Post by TheKillerChicken »

FuryoftheStars wrote: Mon Feb 06, 2023 5:25 am
TheKillerChicken wrote: Mon Feb 06, 2023 4:22 am I noticed that even though 64 bit can go up to 1 decellion, my stacks on items can only go up to 4.2 billion. What is weird is I modified a fluid storage which can store up to 1 million Yotta. Are fluids handled differently than stackable items?
Item stacks are unsigned 32 bit integers. That means they max out at just shy of 4.3 billion (which the game will happily show as 4.2B).
Fluids are double. So as Rseding91 mentioned, it is possible for these to be able to go to Yotta and beyond.
The data points shown in the graphs (what the OP was asking about) are (most likely) a mixture of double (fluids) and either signed or unsigned (depending on if it can negative or not) 64 bit integers (everything else).
I see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: what is the maximum value of the digits

Post by FuryoftheStars »

TheKillerChicken wrote: Wed Feb 08, 2023 5:21 am
FuryoftheStars wrote: Mon Feb 06, 2023 5:25 am
TheKillerChicken wrote: Mon Feb 06, 2023 4:22 am I noticed that even though 64 bit can go up to 1 decellion, my stacks on items can only go up to 4.2 billion. What is weird is I modified a fluid storage which can store up to 1 million Yotta. Are fluids handled differently than stackable items?
Item stacks are unsigned 32 bit integers. That means they max out at just shy of 4.3 billion (which the game will happily show as 4.2B).
Fluids are double. So as Rseding91 mentioned, it is possible for these to be able to go to Yotta and beyond.
The data points shown in the graphs (what the OP was asking about) are (most likely) a mixture of double (fluids) and either signed or unsigned (depending on if it can negative or not) 64 bit integers (everything else).
I see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.
I wish. Then we wouldn't have a 255 tile limit. :D

You can check out the different properties in the wiki. As you dig in, it will give you data types all the way to point of string, uint, etc. For example, if you look up the Prototype Item and check out stack_size (second property in the list), to the right you'll see its of type ItemCountType. Clicking on that will show you that its uint32.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
User avatar
TheKillerChicken
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Mar 02, 2019 7:06 am
Contact:

Re: what is the maximum value of the digits

Post by TheKillerChicken »

FuryoftheStars wrote: Wed Feb 08, 2023 7:55 am
TheKillerChicken wrote: Wed Feb 08, 2023 5:21 am
FuryoftheStars wrote: Mon Feb 06, 2023 5:25 am
TheKillerChicken wrote: Mon Feb 06, 2023 4:22 am I noticed that even though 64 bit can go up to 1 decellion, my stacks on items can only go up to 4.2 billion. What is weird is I modified a fluid storage which can store up to 1 million Yotta. Are fluids handled differently than stackable items?
Item stacks are unsigned 32 bit integers. That means they max out at just shy of 4.3 billion (which the game will happily show as 4.2B).
Fluids are double. So as Rseding91 mentioned, it is possible for these to be able to go to Yotta and beyond.
The data points shown in the graphs (what the OP was asking about) are (most likely) a mixture of double (fluids) and either signed or unsigned (depending on if it can negative or not) 64 bit integers (everything else).
I see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.
I wish. Then we wouldn't have a 255 tile limit. :D

You can check out the different properties in the wiki. As you dig in, it will give you data types all the way to point of string, uint, etc. For example, if you look up the Prototype Item and check out stack_size (second property in the list), to the right you'll see its of type ItemCountType. Clicking on that will show you that its uint32.
I do find it strange how 64-bit is able to be backwards compatible with 32-bit and lower values. I thought x64 was not capable of doing that. I also find it strange why there are these lower integers in a x64 program.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: what is the maximum value of the digits

Post by Rseding91 »

TheKillerChicken wrote: Fri Feb 10, 2023 2:40 pm I do find it strange how 64-bit is able to be backwards compatible with 32-bit and lower values. I thought x64 was not capable of doing that. I also find it strange why there are these lower integers in a x64 program.
64 bit numbers can be used in 32 bit programs as well. Smaller number types exist on the program side because of memory and disk space: it takes less memory to store an 8 bit number than a 64 bit one (1/8th the space). If the number value never needs to be bigger than a given size a lot of memory can be saved by not using the larger type.
If you want to get ahold of me I'm almost always on Discord.
User avatar
TheKillerChicken
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Mar 02, 2019 7:06 am
Contact:

Re: what is the maximum value of the digits

Post by TheKillerChicken »

Rseding91 wrote: Fri Feb 10, 2023 3:32 pm
TheKillerChicken wrote: Fri Feb 10, 2023 2:40 pm I do find it strange how 64-bit is able to be backwards compatible with 32-bit and lower values. I thought x64 was not capable of doing that. I also find it strange why there are these lower integers in a x64 program.
64 bit numbers can be used in 32 bit programs as well. Smaller number types exist on the program side because of memory and disk space: it takes less memory to store an 8 bit number than a 64 bit one (1/8th the space). If the number value never needs to be bigger than a given size a lot of memory can be saved by not using the larger type.
Ah, I did not know that. Thank you for this information. So, if I have this right, if all the integers were 64-bit, we would be looking at ~1 TB of memory just to load this game?
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: what is the maximum value of the digits

Post by Airat9000 »

Airat9000 wrote: Wed Feb 01, 2023 9:14 am
Rseding91 wrote: Sun Jan 29, 2023 5:54 pm kilo=k 1'000
mega=M 1'000'000
giga=G 1'000'000
tera=T 1'000'000'000
peta=P 1'000'000'000'000
exa=E 1'000'000'000'000'000
zetta=Z 1'000'000'000'000'000'000
yotta=Y 1'000'000'000'000'000'000'000
thanks in

there will be no counting above this number? :D
and by the way the question is what will happen if the sum reaches Y and surpasses the value of Yotta :D :D
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: what is the maximum value of the digits

Post by FuryoftheStars »

Airat9000 wrote: Mon Apr 24, 2023 9:05 pm and by the way the question is what will happen if the sum reaches Y and surpasses the value of Yotta :D :D
In many languages, it will "wrap" to the other end of the scale. What this value is depends on if it's signed or unsigned.
Signed, because one of the bits is reserved for +/- indication, will wrap to the negative extreme of where it was just at.
Unsigned, however, will just restart over at 0 (because it does not reserve that bit for +/-).
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Post Reply

Return to “Gameplay Help”