Bugs or features?
per at karlstrom.se
Fri Feb 15 02:40:12 CET 2008
Sorry for the previous post, C-x C-s is not good in Thunderbird ;)
I am just wondering if this is by design or if this is a bug?
The question if this is the intended functionality of the >>= operator
for negative numbers. This differs from how it is defined for native
types like int for example.
This code is an example of what I mean.
//111....101 = -3 in 2'complement representation
int a = -3;
val_mpz>>=1; //Should be 111...10 = -2 for an arithmetic right shift
assert(val_mpz == a); //This will fail!.
More information about the gmp-discuss