Re: Can arithmetic evaluation trap more than just division by zero?
From:
Greg Wooledge
Subject:
Re: Can arithmetic evaluation trap more than just division by zero?
Date:
Tue, 6 Apr 2010 08:35:13 -0400
User-agent:
Mutt/1.4.2.3i
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.)