what is the maximum value of the digits
Posted: Sun Jan 29, 2023 10:54 am
14G to moment
example
example
www.factorio.com
https://forums.factorio.com/
thanks inRseding91 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
It depends on which statistics are being used; fluids use 'double' and things like items use an unsigned 64 bit number.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.
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.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"
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).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?
I see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.FuryoftheStars wrote: Mon Feb 06, 2023 5:25 amItem 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).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?
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 wish. Then we wouldn't have a 255 tile limit.TheKillerChicken wrote: Wed Feb 08, 2023 5:21 amI see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.FuryoftheStars wrote: Mon Feb 06, 2023 5:25 amItem 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).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?
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 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.FuryoftheStars wrote: Wed Feb 08, 2023 7:55 amI wish. Then we wouldn't have a 255 tile limit.TheKillerChicken wrote: Wed Feb 08, 2023 5:21 amI see, thanks for clarifying that for me. I thought all values were 64-bit integers until this was explained to me.FuryoftheStars wrote: Mon Feb 06, 2023 5:25 amItem 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).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?
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).
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.
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.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.
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?Rseding91 wrote: Fri Feb 10, 2023 3:32 pm64 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.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.
and by the way the question is what will happen if the sum reaches Y and surpasses the value of YottaAirat9000 wrote: Wed Feb 01, 2023 9:14 amthanks inRseding91 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
there will be no counting above this number?
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.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