Karim BELABAS on Tue, 4 Feb 2003 19:47:38 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Equality test with bitand


On 4 Feb 2003, Xavier-Francois Roblot wrote:
> On a follow-up at my email, I get the right answer if I do:
>
> ? simplify(bitand(a, 1)) == 0
> %10 = 1
>
> So it looks like the output of bitand is somewhat more complicated that
> it should be.

I introduced this in a recent cleanup patch. It is specified that an integer
of sign 0 has an lgefint() of 2, thus setsigne(x,0) is incorrect if the
pre-existing effective length is larger than 2. My modification of
int_normalize() did not take this into account.

Fixed.

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/