-
Notifications
You must be signed in to change notification settings - Fork 276
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
handle exponents on coefficients of polynomial terms #113
Comments
not done yet! still need to add stuff to do exponent things |
and by "stuff to do exponent things," we still need to handle distributing the exponent to inner ops (namely, nested exponents, multiplication, division). |
added some more clear tests in the description to show what the next steps should implement |
Can we close this issue and make a new one that clearly explains what needs to be done here. I'm not sure what @shirleymiao's PR already fixed and what hasn't been fixed yet. |
sure! the bug is fixed, the examples at the bottom of the main issue description aren't
|
Right now there's this bug:
(2x)^2
->2x^2
(instead of4x^2
)(-x)^2
->-x^2
(instead ofx^2
)There's nothing that handles exponents on simple polynomial terms like this. We should fix
removeUnnecessaryParens
to not remove parens if there's an exponent, and then implement the polynomial operation to do exponents on polynomial terms. (probably in its own tree search afterdivisionSearch
?)(13 / 64) ^ 2 => 13^2 / 64^2
(2x)^2
->2^2 x^2
(2^x)^2
->2^(2*x)
thanks to @kevinbarabash for finding this
The text was updated successfully, but these errors were encountered: