google / mathsteps

Step by step math solutions for everyone
https://socratic.org
Apache License 2.0
2.12k stars 274 forks source link

cancel out subtraction with same term better #221

Open evykassirer opened 6 years ago

evykassirer commented 6 years ago

for collect and combine like terms, addition, you'd see steps like this right now

y + 2x - 2x
y + (2-2)x
y + 0x
y + 0
y

it should instead just do

y + 2x - 2x
(maybe y + 0?)
y

you see this a lot in equation solving code, not totally sure the best place to fix it but opening an issue cause it's really not great pedagogically haha

psmyth commented 6 years ago

Hi, I'm interested in working on this.

evykassirer commented 6 years ago

yay! thanks for your interest 🎉 this is now assigned to you :)

I think before we get started it'd be good to have an idea of exactly what we'll change. Did you want to explore that yourself, have a conversation about it, or would you prefer if I made a call and you did the coding changes?

psmyth commented 6 years ago

I think you should make the call on how you want to handle it. I think the steps you laid out above are a good model.

evykassirer commented 6 years ago

Cool - let's start with the case where 2x - 2x goes to 0 immediately instead of (2-2)x

Later if we can find a clean way of not having the 0 there at all (but only when it's part of a bigger sum) that'd be ✨

If you'd like assistance in finding the relevant area of the codebase to change and how to go about making the change let me know! Thanks for taking this on, it'll be much better :)