-
Notifications
You must be signed in to change notification settings - Fork 172
implement coeff
#677
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
implement coeff
#677
Conversation
bf53d3d to
7594e71
Compare
|
I am wondering the expected results of the following cases. |
This is tricky. What do you expect for this case? |
|
Thanks for the comments.
These examples work if you julia> ((x + 1)^4 + x)^3 |> expand |> e -> coeff(e, x^2)
93
julia> (x^2 - 1) / (x - 1) |> simplify |> e -> coeff(e, x)
1I believe it should be up to the user to
julia> (x^(1//2) + y^0.5)^2 |> expand |> e -> coeff(e, x)
1Works after expansion too.
Agreed, so maybe let's focus on examples not involving quotients (monomials). This PR isn't meant to be exhaustive, but incremental.
Maybe the wording wasn't right, but to me clarity of the code is an enhancement. Consistency is also imo a necessity. I'll rephrase that. |
84518ca to
5f9b686
Compare
|
Nice! Could you add doc strings for |
We have the same problem of too many exported symbols in
Added. |
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #677 +/- ##
==========================================
- Coverage 76.99% 76.93% -0.06%
==========================================
Files 23 23
Lines 2712 2710 -2
==========================================
- Hits 2088 2085 -3
- Misses 624 625 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
resolve #612 |
|
Thank you!! |
Hi,
This is a proposition in order to obtain the coefficients from
Symbolicexpressions (focusing on monomials).Fix #216.
Fix #374.
Fix #236.
I've also rewritten
degreeas anfcin the same pattern ascoefffor consistency (enhanceafter #241).Open question (which needs to be settled forcoeff°ree): how do we handleSymbolicUtils.Div?degree(x / y, x)currently throws aStackOverflowError(added as a@test_brokenintest/degree.jl).EDIT: handling
Divis outside the scope of this PR.