Stephane CHAZELAS wrote:
> Bob Proulx wrote:
> [...]
> > Your expressions above are overflowing the value of your system's
> > maximum integer size.  You can read the system's maximum integer size
> > using getconf.
> >
> >   $ getconf INT_MAX
> >   2147483647
> [...]
> 
> POSIX requires that arithmetic expansion be using at least
> signed longs, so getconf INT_MAX wouldn't necessarily be
> correct.

Ah...  I didn't know that.  Thank you for that correction.

Unfortunately LONG_MAX is not available from getconf.  But on my
system in limits.h LONG_MAX is defined as 9223372036854775807 and the
at least one of the previous example calculations was:

        echo $((72057594037927936*128))

which according to bc works out to be:

  9223372036854775808

Bob

Reply via email to