Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polynomial conversion should not change the function #358

Closed
jishnub opened this issue Oct 19, 2021 · 2 comments
Closed

Polynomial conversion should not change the function #358

jishnub opened this issue Oct 19, 2021 · 2 comments

Comments

@jishnub
Copy link
Contributor

jishnub commented Oct 19, 2021

Currently conversion between polynomial types passes the coefficients on directly to the constructor. As an example,

julia>= Polynomial([0,0,1])
Polynomial(x^2)

julia> ChebyshevT(x²)
ChebyshevT(1T_2(x))

It would have been better here if the constructor returned the Chebyshev polynomial decomposition of , rather than using the coefficients directly. The present behavior changes the function, which arguably shouldn't happen.

@jverzani
Copy link
Member

Yes, definitely a bug. They should represent the same polynomial in different bases up to floating point. Thanks for the heads up

@jverzani
Copy link
Member

Many thanks. Fixed and tagged.

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

No branches or pull requests

2 participants