I just played around in AndroidStudio and came across this number: 8198552921648689606
my code looks like this:
int x = 1;
for (int i = 0; i<64; i++)
{
x++;
x *= 10;
}
print(x);
For some reason it gets stuck on this weird number. I expected it to jump around on the integer line but for all the numbers above 64 it just stays like this.
It only happens with the numbers 10 or 100 or 1000(or any factor of ten i would assume) as a factor and it happens in Java as well.
The numbers that it gets stuck on change depending on the type of bit system and the numbers used but it gets stuck all the time.
Seems to be a weird coincidence regarding the integer line but i would really like to know whats going on.
Update: Seems to happen with even factors but not with odd ones. Still cant wrap my head around this though.