I'm curious as to what happens when a numeric variable in bash is incremented up without purposely stopping it. How large can the number get? Will it overflow and become negative and just continue to increment forever? Will it break and skid to a stop at some point?
I am using an x86_64 AMD processor, but I would be happy to hear 32bit answers as well, just specify which you are talking about. I am running Fedora21 64bit.
I've googled far and wide but haven't found this specific tidbit for some odd reason. It seems like it would be a basic piece of info in all the manuals and such.
for i in {0..70}; do echo 2 to the power of $i = $((2**i)); done
ksh
which does floating point arithmetics, not integer one likebash
:ksh -c 'echo $((2**1023))'
→8.98846567431157954e+307