Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/expint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ struct SimplePoly{T}
coeffs::Vector{T}
end

Base.:*(p::SimplePoly, c) = SimplePoly(p.coeffs * c)
Base.:*(c, p::SimplePoly) = p * c
Base.:*(p::SimplePoly, c::Number) = SimplePoly(p.coeffs * c)
Base.:*(c::Number, p::SimplePoly) = p * c
Comment on lines +8 to +9

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need both forms? AFAICT SimplePoly is completely internal, so likely one form should be sufficient?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a question for you and the other maintainers, I'm not at all familiar with the internals 😅 When it comes to invalidations I don't think it would matter.


function Base.:+(p::SimplePoly{S}, q::SimplePoly{T}) where {S, T}
n, m = length(p.coeffs), length(q.coeffs)
Expand Down
Loading