Skip to content

Commit

Permalink
Restore Oscar 1.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
SoongNoonien committed Jan 16, 2025
1 parent 75dce44 commit 441895f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/GenericCyclotomics.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if pkgversion(Oscar) < v"1.2.0"
function Base.denominator(a::AbstractAlgebra.Generic.MPoly{QQFieldElem})

Check warning on line 2 in src/GenericCyclotomics.jl

View check run for this annotation

Codecov / codecov/patch

src/GenericCyclotomics.jl#L2

Added line #L2 was not covered by tests
# TODO why is lcm of empty list not defined?
denominators = [denominator(c) for c in coefficients(a)]
if isempty(denominators)
d = ZZ(1)

Check warning on line 6 in src/GenericCyclotomics.jl

View check run for this annotation

Codecov / codecov/patch

src/GenericCyclotomics.jl#L4-L6

Added lines #L4 - L6 were not covered by tests
else
d = lcm(denominators)

Check warning on line 8 in src/GenericCyclotomics.jl

View check run for this annotation

Codecov / codecov/patch

src/GenericCyclotomics.jl#L8

Added line #L8 was not covered by tests
end
end
end

@doc raw"""
kempner_with_data(m::Int64)
Expand Down

0 comments on commit 441895f

Please sign in to comment.