In C and Java, there are defined constants representing the maximum and minimum values an integer can hold.
Are there such constants in awk? If so, what are their names?
The awk manual indicates that awk can support arbitrary precision integer arithmetic with -M, but I'd like to know about the bounds on integers when we do not specify -M.
Not really something I've considered before so I may be barking up the wrong tree completely but since awk uses double-precision floating-point numbers by default, maybe what you're looking for is based on the value of
PRECin gawk (see https://www.gnu.org/software/gawk/manual/gawk.html#Setting-precision). Look:Notice how integer arithmetic fails when you try to go beyond
2^PREC? So maybe2^PRECis a reasonable value to use for a MAX_INT equivalent and you could derive a MIN_INT similarly. Think about it, try it, see if it makes sense for your needs....