Skip to content

Characteristic polynomial of integer matrix has wrong degree #305

@vneiger

Description

@vneiger

An issue in SageMath was raised here sagemath/sage#35846 . When computing the characteristic polynomial of some 35 x 35 integer matrix, we get x^27, which does not have the correct degree. The same issue already appears within LinBox. Running the piece of code attached, with the current git version of LinBox, and with the matrix from the above Sage issue (attached as well in sms format), I get:

$ ./issue_charpoly
Characteristic Polynomial is X^27

whereas we expect a polynomial of degree 35. Trying with the same matrix on some Modular<double> coefficient domain (for this, comment/uncomment a couple of lines in the code), everything seems to be fine.

I wondered about some problem due to randomization and briefly tried to force a deterministic algorithm, but did not find quickly how to do this. May be related to #53 .

issue_sage_35846_charpoly.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions