mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 14:46:44 +02:00
rational division for integral group rings
This commit is contained in:
parent
486f2cff9a
commit
148c8e2611
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user