[sage-devel] Re: Computing determinants of obviously singular matrices

2019-03-18 Thread Maximilian Jaroschek
On Friday, March 15, 2019 at 10:59:06 PM UTC+1, Kwankyu Lee wrote: > > Hi, > > If the determinant is obviously zero, then you don't need to run the > computation. If a preprocessing to check zero rows or columns is added, > then the determinant computation would become slower for usual nontrivia

Re: [sage-devel] Re: Computing determinants of obviously singular matrices

2019-03-16 Thread Vincent Delecroix
Indeed the determinant code in matrix2.pyx is a huge mess. Some dispatch is unavoidable but many specialized matrix implement their own determinant function: matrix_complex_ball_dense.pyx matrix_double_dense.pyx matrix_gap.pyx matrix_integer_dense.pyx matrix_mod2_dense.pyx matrix_modn_sparse.pyx

Re: [sage-devel] Re: Computing determinants of obviously singular matrices

2019-03-16 Thread 'Martin R' via sage-devel
I think the problem is that it computes the characteristic polynomial and then takes the constant term. That seems a bit wasteful, no? c = self.charpoly(var, algorithm="df")[0] Martin Am Freitag, 15. März 2019 23:07:04 UTC+1 schrieb Dima Pasechnik: > > On Fri, Mar 15, 2019 at 02:59:05PM -0

Re: [sage-devel] Re: Computing determinants of obviously singular matrices

2019-03-15 Thread dimpase
On Fri, Mar 15, 2019 at 02:59:05PM -0700, Kwankyu Lee wrote: > > If the determinant is obviously zero, then you don't need to run the > computation. If a preprocessing to check zero rows or columns is added, > then the determinant computation would become slower for usual nontrivial > cases. I

[sage-devel] Re: Computing determinants of obviously singular matrices

2019-03-15 Thread Kwankyu Lee
Hi, If the determinant is obviously zero, then you don't need to run the computation. If a preprocessing to check zero rows or columns is added, then the determinant computation would become slower for usual nontrivial cases. Cheers. On Saturday, March 16, 2019 at 2:15:06 AM UTC+9, Maximili