Hi,

The following simple session triggers what I think is at least one bug, if not 
two:

sage: p=193379
sage: K=GF(p)
sage: a=K(1)
sage: b=K(191495)
sage: c=K(109320)
sage: d=K(167667)
sage: e=103937
sage: a*c+b*d-e
102041
sage: vector([a,b])*vector([c,d])-e
-91339
sage: -91339+e
12598
sage: vector([a,b])*vector([c,d])
12599


Namely, the scalar product of GF(p) elements followed by a subtraction is 
negative (first bug).

Then the negative value is off by one (second bug).

Some weird coercion seem to happen between IntegerMod_int64 IntegerMod_int and 
ZZ:

sage: type(vector([a,b])[0])
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int64'>
sage: type(vector([a,b])*vector([c,d]))
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>

Are these known bugs?

Best.

Clément

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/efa76bd3-53ba-e1af-5e84-b3ea428836de%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to