fix the determinan for finite fields

This commit is contained in:
kalmar 2017-03-17 15:31:14 +01:00
parent 3ec3b553e8
commit 72997b58d0
1 changed files with 2 additions and 0 deletions

2
SL.jl
View File

@ -43,6 +43,8 @@ import Base.LinAlg.det
function det(M::Array{Mod,2})
if size(M,1) size(M,2)
d = Mod(0,M[1,1].mod)
elseif size(M,1) == 1
d = M[1,1]
elseif size(M,1) == 2
d = M[1,1]*M[2,2] - M[1,2]*M[2,1]
else