Skip to content

Negative exponents in SparsePolynomial #411

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

Merged
merged 11 commits into from
May 31, 2022
Merged

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented May 30, 2022

Fixes #409, now

julia> SparsePolynomial(Dict(-1=>3, 2=>4))
SparsePolynomial(3*x^-1 + 4*x^2)

@jishnub jishnub marked this pull request as draft May 30, 2022 18:08
@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #411 (438143a) into master (8b1c45a) will increase coverage by 0.66%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #411      +/-   ##
==========================================
+ Coverage   83.11%   83.77%   +0.66%     
==========================================
  Files          23       23              
  Lines        2790     2799       +9     
==========================================
+ Hits         2319     2345      +26     
+ Misses        471      454      -17     
Impacted Files Coverage Δ
src/common.jl 90.05% <100.00%> (+0.56%) ⬆️
src/polynomials/LaurentPolynomial.jl 95.33% <100.00%> (+5.54%) ⬆️
src/polynomials/SparsePolynomial.jl 100.00% <100.00%> (+1.70%) ⬆️
src/polynomials/standard-basis.jl 88.12% <100.00%> (+0.31%) ⬆️
src/polynomials/pi_n_polynomial.jl 77.77% <0.00%> (-22.23%) ⬇️
src/polynomials/factored_polynomial.jl 85.31% <0.00%> (+0.56%) ⬆️
src/show.jl 81.73% <0.00%> (+4.34%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b1c45a...438143a. Read the comment docs.

@jverzani
Copy link
Member

Looks nicely done. Thanks! I’ll merge in soon.

@jishnub jishnub marked this pull request as ready for review May 31, 2022 06:44
@jishnub
Copy link
Member Author

jishnub commented May 31, 2022

This should be ready now

@jverzani
Copy link
Member

I found an issue with integrate and derivative; let me merge this, then push those changes if they are still needed. Thanks so much for this!!

@jverzani jverzani merged commit 095c3ba into JuliaMath:master May 31, 2022
@jishnub jishnub deleted the sparseneg branch May 31, 2022 12:51
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

Successfully merging this pull request may close these issues.

Should SparsePolynomial support negative exponents?
2 participants