Skip to content

Commit

Permalink
Tweak for towers of polys
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Oct 31, 2024
1 parent f72a3a1 commit ade496d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3366,6 +3366,11 @@ function (f::PolyRingElem)(a::PolyRingElem)
return compose(f, a; inner = :second)
end

function (f::PolyRingElem{T})(a::T) where T
base_ring(f) == parent(a) || return subst(f, a)
return evaluate(f, a)

Check warning on line 3371 in src/Poly.jl

View check run for this annotation

Codecov / codecov/patch

src/Poly.jl#L3369-L3371

Added lines #L3369 - L3371 were not covered by tests
end

(f::PolyRingElem)(a::Integer) = evaluate(f, a)

function (f::PolyRingElem)(a::RingElem)
Expand Down

0 comments on commit ade496d

Please sign in to comment.