On 04/06/2010 02:35 PM, Greg Wooledge wrote:
On Tue, Apr 06, 2010 at 02:21:05PM +0200, Roman Rakus wrote:
$((2 ** 63 / -1))
I can reproduce it in 4.1.2(1)-release and 4.0.23(1)-release on x86_64
GNU/Linux. I didn't try on bash 3.2.
cyclops:~$ uname -a; echo $BASH_VERSION
OpenBSD cyclops.wooledge.org 4.6 GENERIC.MP#81 amd64
4.0.24(1)-release
cyclops:~$ echo $((2 ** 63 / -1))
Connection to cyclops closed.
griffon:~$
An amd64-specific bug, then? (The Linux box I tested on earlier is i386,
and the HP-UX box is PA-RISC 2.0.)
I guess the bug is somewhere in glibc and specific for 32 bit systems.
(2^63) is same as (2^63/-1) on 32bit system (tested on ppc32).
RR