Page 1 sur 1

a bug in charpoly

Publié : lun. mai 28, 2018 6:11 am
par lukamar
There is apparently some bug in the command charpoly. If I enter

Code : Tout sélectionner

A:=[[0,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1],[1,0,1,0,0,1,1,0,0,0,0,0,1,1,0,0],[0,1,0,1,0,0,1,1,0,0,0,0,0,1,1,0],[1,0,1,0,1,0,0,1,0,0,0,0,0,0,1,1],[1,0,0,1,0,1,0,1,1,1,0,0,0,0,0,0],[1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0],[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0],[0,0,1,1,1,0,1,0,1,0,0,1,0,0,0,0],[0,0,0,0,1,0,0,1,0,1,0,1,1,1,0,0],[0,0,0,0,1,1,0,0,1,0,1,0,0,1,1,0],[0,0,0,0,0,1,1,0,0,1,0,1,0,0,1,1],[0,0,0,0,0,0,1,1,1,0,1,0,1,0,0,1],[1,1,0,0,0,0,0,0,1,0,0,1,0,1,0,1],[0,1,1,0,0,0,0,0,1,1,0,0,1,0,1,0],[0,0,1,1,0,0,0,0,0,1,1,0,0,1,0,1],[1,0,0,1,0,0,0,0,0,0,1,1,1,0,1,0]];
charpoly(A,x)
I get "Not invertible Error". However, the command

Code : Tout sélectionner

det(x*idn(16)-A)
gives the expected result.

Re:

Publié : lun. mai 28, 2018 4:26 pm
par parisse
Indeed, missing % modulo at line 12742 in vecteur.cc.