From d2e9688e9f7afb52cf4b4952099e673bf3782103 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Mon, 13 Aug 2018 19:29:10 +0200 Subject: [PATCH] replace all the // function by a single, simple one --- src/GroupRings.jl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index b5b8316..2586a62 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -299,17 +299,7 @@ end *(a::Union{AbstractFloat, Integer, RingElem, Rational}, X::GroupRingElem) = mul(a,X) (/)(X::GroupRingElem, a) = 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)) - -(//){T<:Rational, S<:Integer}(X::GroupRingElem{T}, a::S) = X//convert(T,a) +(//)(X::GroupRingElem, a::Union{Integer, Rational}) = 1//a*X ############################################################################### #