-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Simplify can't simplify a/(b/c) #1725
Comments
Would be nice to improve this! Thanks for your feedback. Anyone interested in looking into rules to simplify expressions like |
Fixed via #1734 (fix not yet published) |
Not sure how your new fix will perform on more general expressions, but I've just been testing the Algebrite library, which seems to do a pretty good job simplifying, eg, ratios of monomials. I'll be interested to test it against the new mathjs version when it's published. In principle, if the Algebrite engine still performs better, would it make sense to try to implement some of their CAS algorithms in mathjs, or is the underlying architecture too different? (Aside from being coffeescript...) |
Yes Algebrite is really impressive! I'm totally open to see if we can somehow integrate, or at least draw inspriation from the way Algebrite solves equations. |
This fix is published now in |
I'm finding that
simplify
isn't working well with ratios of monomials.I think this is probably due to it not even being able to simplify
a/(b/c)
- it just returns the same thing.This is most obvious when you give it
a/(a/c)
. Instead of givingc
it just gives you backa/(a/c)
.To work around this, I'm currently trying to use a patchwork of
simplify
andrationalize
calls.eg I use
rationalize
fora/(a/c) -> a*c/a
then use
simplify
fora*c/a -> c
For more complex examples, I loop through
rationalize
thensimplify
several times. This approach is obviously very ugly and unpredictable, and anyhow can't be used for a lot of monomials sincerationalize
crashes on them due to #1724.The text was updated successfully, but these errors were encountered: