Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

PowerSeries and Polynomial step on eachother's toes #2

Open
jwmerrill opened this issue Jan 18, 2014 · 2 comments
Open

PowerSeries and Polynomial step on eachother's toes #2

jwmerrill opened this issue Jan 18, 2014 · 2 comments

Comments

@jwmerrill
Copy link
Owner

In PowerSeries.jl, I intentionally stuck to the same notation as Polynomial.jl for integration, differentiation, and evaluation: polyint, polyder, and polyeval. This notation is in turn borrowed from matlab.

I currently don't import those methods from Polynomial because PowerSeries doesn't "depend" on Polynomial any more than Polynomial depends on PowerSeries, and I don't want to make Polynomial a requirement for this library.

This causes problems if you try to import both of them at the same time

julia> using Polynomial

julia> polyint(poly([1.0, 2.0]))
Poly(0.3333333333333333x^3 + -1.5x^2 + 2.0x^1)

julia> using PowerSeries
Warning: using PowerSeries.polyint in module Main conflicts with an existing identifier.

What's the right thing to do here?

I'm hoping the answer isn't "depend on Polynomial", because the packages are actually peers, and breaking one shouldn't break the other.

@jiahao
Copy link

jiahao commented Mar 19, 2014

What do you consider conceptually distinct between PowerSeries and Polynomial?

@jwmerrill
Copy link
Owner Author

PowerSeries always truncates to a fixed order.

At the time I opened this ticket, Polynomial.jl also had no docs and very little activity, which made me even more hesitant to depend on it. I've since contributed some docs for Polynomial.jl.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants