## a bug in charpoly

Bugs

lukamar
Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

### a bug in charpoly

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.

parisse
Messages : 5090
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

### Re:

Indeed, missing % modulo at line 12742 in vecteur.cc.