google / mathsteps

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

Another bug : 2/x=3/4 #268

Open fpiou opened 2 years ago

fpiou commented 2 years ago

Another bug :

steps = solveEquation('2/x = 3') ---> 'x=2/3' (works fine)

but

steps = solveEquation('2/x = 3/4') ---> Math error: No term with symbol: x, returning no steps at stepThrough.js?5f71:102 after a step with MULTIPLY_TO_BOTH_SIDES

Originally posted by @fpiou in https://github.com/google/mathsteps/issues/267#issuecomment-1000944187

fpiou commented 2 years ago

Here is a solution :

In file Symbols.js at line 31 :

else if (Node.Type.isOperator(node, '+') *|| Node.Type.isOperator(node, '')**) {

kernelshreyak commented 2 years ago

I am working on this.