-
Notifications
You must be signed in to change notification settings - Fork 156
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
Bug fixes, integration of solve_interms_ofvar and some changes #1357
Conversation
A next todo would be using |
If im not mistaken, this fixes #1356 |
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 #1357 +/- ##
===========================================
+ Coverage 3.98% 79.07% +75.09%
===========================================
Files 50 50
Lines 4771 4880 +109
===========================================
+ Hits 190 3859 +3669
+ Misses 4581 1021 -3560 ☔ View full report in Codecov by Sentry. |
One data point: In Maple 2024 |
@sumiya11 Do you think this is preferable? i have a feeling that "nothing" could be confused with "we cant solve this". |
In julia |
- strict (optional): Bool that enables/disables strict assert if input expression is a univariate polynomial or not. If strict=true and expression is not a polynomial, `solve_univar` throws an assertion error. | ||
|
||
# Examples | ||
|
||
""" | ||
function solve_univar(expression, x; dropmultiplicity=true) | ||
function solve_univar(expression, x; dropmultiplicity=true, strict=true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should solve_univar be renamed to solve_univar_poly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solve_multivar
should be renamed to solve_multivar_poly
aswell then - i'll do it when i get the time
I guess Inf is fine. My thoughts are: Inf for 1/x is fine since substituting Inf back gives zero. In that vein, solve(x / x^2) should return nothing. So it is not clear to me how useful Inf could be in general. On the other hand, returning nothing for 1/x is easy and correct (in a sense that the roots of P(x) / Q(x) = 0 is a subset of the roots of P(x) = 0). |
Another data point: >>> sympy.solve(1/x)
[]
>>> sympy.solve(x**(1.5))
[0.0] UPD: Reduce julia> "solve(1/x, x)" |> rcall
"{}"
julia> "solve(x^(1.5), x)" |> rcall
"{x=0,x=0}" |
@sumiya11 Looks like its universal
Matlab
|
If this renaming is happening and may happen in the future, it would be good to either document the API as experimental (so users know it can undergo breaking changes) and/or make the old names fall back to the new ones. EDIT: Meant to reply to #1357 (comment) |
Yes i'll deprecate them and make them call the new renamed versions |
Does the output of 1/x matter in MTK btw? which would u prefer @AayushSabharwal |
It doesn't particularly matter for MTK |
New stuff:
"Strict" kwarg for
solve_univar
@AayushSabharwal :Documentation and integration of
solve_interms_ofvar
was also added.ia_rules.jl
was moved tospecial_cases.jl
because thats more representative i think, since thesolve_interms_ofvar
case isnt "isolation and attraction" - its just some algebraic manipulation method we use in a special case @ChrisRackauckas (let me know what you think).