Boost logo

Boost :

Subject: Re: [boost] [mp_int] Incorrect comparison with native types
From: Kevin Sopp (baraclese_at_[hidden])
Date: 2009-01-13 09:11:23


> The interpretation of OR that you describe is consistent with
> libtommath (of course) but not with other arbitrary-precision-integer
> packages that I have tried. When I try either 13 OR -1 or (BIG(1) <<
> 200) | -1, I get -1 from all of the following:
>
> gmp
> java.math.BigInteger
> Python's built-in long type
> Ruby's built-in Bignum type
>
> Likewise, all of these give me -14 for (BIG(13) ^ -1), while
> libtommath and mp_int give -12.

Are you trying to say that you prefer the behavior of the other libraries?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk