diff --git a/src/Characters/gf.jl b/src/Characters/gf.jl index 05c2476..6d0cba2 100644 --- a/src/Characters/gf.jl +++ b/src/Characters/gf.jl @@ -27,7 +27,7 @@ characteristic(::GF{q}) where {q} = q Base.:(==)(n::GF{q}, m::GF{q}) where {q} = Int(n) == Int(m) # hash(GF) == 0x04fd9e474909f8bf function Base.hash(n::GF{q}, h::UInt) where {q} - return xor(0x04fd9e474909f8bf, hash(q, hash(Int(n), h))) + return xor(0x04fd9e474909f8bf % UInt, hash(q, hash(Int(n), h))) end Base.:+(n::GF{q}, m::GF{q}) where {q} = GF{q}(Int(n) + Int(m), false) diff --git a/test/characters.jl b/test/characters.jl index ddb1a3c..12e6790 100644 --- a/test/characters.jl +++ b/test/characters.jl @@ -54,5 +54,5 @@ end @test sprint(show, -2chars[1] + 3chars[2]) == "-2·χ₁ +3·χ₂" @test sprint(show, MIME"text/plain"(), chars[1]) == - "Character over Cyclotomic{Rational{Int64}, SparseVector{Rational{Int64}, Int64}}\nχ₁" + "Character over Cyclotomic{Rational{$Int}, SparseVector{Rational{$Int}, $Int}}\nχ₁" end