1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-28 18:50:29 +01:00

rational division for integral group rings

This commit is contained in:
kalmar 2017-05-18 12:19:41 +02:00
parent 486f2cff9a
commit 148c8e2611

View File

@ -233,6 +233,12 @@ end
(/)(X::GroupRingElem, a) = scalar_mult(1/a, X)
function (//){T<:Integer, S<:Integer}(X::GroupRingElem{T}, a::S)
U = typeof(X[1]//a)
warn("Rational division: promoting result to $U")
return convert(U, X)//a
end
(//){T<:Rational, S<:Rational}(X::GroupRingElem{T}, a::S) =
GroupRingElem(X.coeffs//a, parent(X))