[ast-users] Bad math for right shift () 64 bits?

2013-12-30 Thread Gordon Marler (BLOOMBERG/ 120 PARK)
Not clear on whether ksh93's right shift () is arithmetic or logical, as that may affect the outcome here, but here's what I'm observing: This is for ksh93 version: # print ${.sh.version} Version JM 93u 2011-02-08 Noticing that when we right shift a value, things seem to work right initially:

Re: [ast-users] Bad math for right shift () 64 bits?

2013-12-30 Thread Janis Papanagnou
Interested in the behaviour I tried that with my version (Version JM 93t+ 2010-03-05( and it gives the same result. Moreover I noticed that in integerb=$((2**32)) ; for ((i=0;i=97;i++)) ; do printf %5d\t%12d\n $i $(( b i )) ; done typeset -i b=$((2**32)) ; for ((i=0;i=97;i++)) ; do printf