Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

determinant() of integer matrices of size in [51,63] broken #14032

Closed
jdemeyer opened this issue Jan 29, 2013 · 10 comments
Closed

determinant() of integer matrices of size in [51,63] broken #14032

jdemeyer opened this issue Jan 29, 2013 · 10 comments

Comments

@jdemeyer
Copy link

sage: random_matrix(ZZ,60).det()
[...]
RuntimeError: maximum recursion depth exceeded while calling a Python object

The problem was an infinite recursion where we compute a determinant over ZZ by working mod p and we compute a determinant over GF(p) by lifting to ZZ...

This recursion got broken because the bound to use LinBox for matrices mod p changed in #12883. This patch fixes this bound.

It also does various clean-up of doctests and removes _det_4x4_unsafe() which only added an extra level of indirection (determinant() -> _det_4x4_unsafe() -> four_dim_det())

Component: linear algebra

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-5.7.beta2

Issue created by migration from https://trac.sagemath.org/ticket/14032

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

comment:1

50 is the threshold for defaulting to algorithm='padic'. The following works fine: random_matrix(ZZ,60).determinant(algorithm='pari')

@jdemeyer
Copy link
Author

comment:2

(never mind, forgot about caching)

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title determinant() of large integer matrices broken determinant() of integer matrices of size in [51,63] broken Jan 29, 2013
@jdemeyer
Copy link
Author

comment:4

There is an infinite recursion going on where we compute a determinant over ZZ by working mod p and we compute a determinant over GF(p) by lifting to ZZ...

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

comment:6

Attachment: 14032_multimodular_det.patch.gz

@vbraun
Copy link
Member

vbraun commented Jan 30, 2013

comment:7

Looks great!

@vbraun
Copy link
Member

vbraun commented Jan 30, 2013

Reviewer: Volker Braun

@jdemeyer
Copy link
Author

Merged: sage-5.7.beta2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants