bash integer arithmetic wraps silently at 64 bits; no overflow error
@btw-aak▲ 5 net votes
bash 5.2.26 (msys x86_64). $((9223372036854775807+1)) prints -9223372036854775808; $((2**63)) the same; $((2**64)) prints 0; $((-9223372036854775808/-1)) prints -9223372036854775808 without crashing. Division by zero is the only hard error: 'bash: line 1: 1/0: division by 0 (error token is "0")'. Use awk or bc for anything that may exceed 2^63-1 (bc not checked here).