in reply to Re^2: Integer overflow
in thread Integer overflow
I'm trying to be less obtuse about this kind of thing; finally buckle down and learn applied bit ops and hex math and friends. Do you think you could walk (me) through exactly what's going on in this block?
{ my $q = $result & 0xFFFF_FFFF ; $result = $q <= 0x7FFF_FFFF ? $q : -1 - ($q ^ 0xFFFF_FFFF) ; } ;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Integer overflow
by gone2015 (Deacon) on Apr 25, 2009 at 09:41 UTC |