rationalize for Integral Group Rings

This commit is contained in:
kalmar 2017-05-18 17:58:13 +02:00
parent 92daac300b
commit ca3ec95ea2
1 changed files with 4 additions and 0 deletions

View File

@ -349,6 +349,10 @@ norm(X::GroupRingElem, p=2) = norm(X.coeffs, p)
augmentation(X::GroupRingElem) = sum(X.coeffs)
function rationalize{T<:Integer, S<:Integer}(::Type{T}, X::GroupRingElem{S})
return convert(Rational{T}, X)
end
function rationalize{T<:Integer, S<:Number}(::Type{T}, X::GroupRingElem{S};
tol=eps(S))
v = rationalize(T, X.coeffs, tol=tol)