Date: Sun, 17 Jul 2022 14:13:16 +1000
From: Martin D Kealey <[email protected]>
Message-ID:
<CAN_U6MWRovocRJ3si5mdn=vscqbgpt3jgibfhyfxztjybix...@mail.gmail.com>
| At least by explicitly exposing the word size in a controlled manner, we
| can write code that avoids unintended overflow.
For just getting the word size, a better solution would be to request a
new predefined variable (eg: BASH_ARITH_BITS) which contains the number
of bits used for arithmetic. Inventing new mechanisms so you can compute
it dynamically is crazy - it will not change while bash is running.
Most of the rest of what you are suggesting doesn't belong in shell arith,
you should be using a language suited to numeric computing (FORTRAN?)
for most of that, not shell scripting. Use the right tool for the job.
kre