Closed aelnaiem closed 7 years ago
I tried adding these two tests to cancelLikeTerms.test.js
['nthRoot(2)/nthRoot(2)', '1']
['abs(x)/abs(x)', '1']
and both passed
is this failing somewhere else @aelnaiem ?
Not sure where this should go, but would another test case be ['((-x)^2)/(x^2)', '1']
?
ooo yeah.
I think that'd be separate from this though. We want to handle (-x)^2 -> x^2. This is a dealing with negatives/coefficients when squaring thing, which we don't do at all i think? (2x)^2
might not even go to 4x^2
. Let's open an issue for that
Interesting! Let's close this and open another issue, and I'll track down why our specific implementation had this bug.
nthRoot(2)/nthRoot(2)
should simplify to 1, similarly for abs(x)/abs(x)