From 4e213c691df9f803dc365e80079ea274121967b5 Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 11 Jul 2017 22:37:53 +0200 Subject: [PATCH] throw if dividing by a non-unit --- src/GroupRings.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index b87b1ae..e2aa5ef 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -387,10 +387,12 @@ function divexact{T}(X::GroupRingElem{T}, Y::GroupRingElem{T}) else idx = findfirst(Y) c = Y[idx] + c == 0 || throw("Can not invert") g = parent(Y).basis[idx] return X*1//c*parent(Y)(inv(g)) end end + ############################################################################### # # *-involution