google / mathsteps

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

bug : x-2/3=0 #267

Open fpiou opened 2 years ago

fpiou commented 2 years ago

Below is four example of what mathsteps is doing. The 1 cause strange transformation, the 3 is false. The 2 and 4 are the same than 1 an 3 without bug.

The problem occur when the end of the leftNode or rightNode is like "-a/b".

1) steps = solveEquation('x - 2/3 = 0') ----> 'x + -(--2 / 3) = 0'

2) steps = solveEquation('x - 2/3+0 = 0') ----> 'x + -2 / 3 + 0 = 0'

3) steps = solveEquation('x - (-2/3) = 0') ----> 'x + -(--2 / 3) = 0'

4) steps = solveEquation('x - (-2/3) + 0 = 0') ----> 'x - (-2 / 3) + 0 = 0'