I don't know if this is a bug in factorio or not.. or if its in the mods I'm using or not.. but I've sometimes had it where pipes don't seem to fully empty.. (they register 0.0 fluid in them) and then tanks or other machines seem to have slightly less than round-numbers of materials in them..
Is this a glitch of the mods? (I'm playing seablock) or is it something inherent to the system? (I swear I've seen it happen in vanilla factorio with oil/oil-products as well)
Sorry if this is the wrong location for this thread, its my first post and I'm unsure exactly where to post it...
Fractional/rounding glitches?
Re: Fractional/rounding glitches?
It's simply how floating point numbers work in computers: it's not possible to represent every real number in binary format because it doesn't have infinite precision.
For example: 1/3rd can't be stored in a single value because it's technically infinite: 0.3333333333333~ forever.
For example: 1/3rd can't be stored in a single value because it's technically infinite: 0.3333333333333~ forever.
If you want to get ahold of me I'm almost always on Discord.
Re: Fractional/rounding glitches?
More precisely - if its binary representation isn't finite.
For example, 1/5 = 0.2, which has a finite representation in base 10. However, in base 2 it is 0.00110011..., so it can still not be represented accurately in a binary floating point number (=the sane way computers handle non-integers)
For example, 1/5 = 0.2, which has a finite representation in base 10. However, in base 2 it is 0.00110011..., so it can still not be represented accurately in a binary floating point number (=the sane way computers handle non-integers)