Open fpiou opened 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'
steps = solveEquation('x - 2/3 = 0')
2) steps = solveEquation('x - 2/3+0 = 0') ----> 'x + -2 / 3 + 0 = 0'
steps = solveEquation('x - 2/3+0 = 0')
3) steps = solveEquation('x - (-2/3) = 0') ----> 'x + -(--2 / 3) = 0'
steps = solveEquation('x - (-2/3) = 0')
4) steps = solveEquation('x - (-2/3) + 0 = 0') ----> 'x - (-2 / 3) + 0 = 0'
steps = solveEquation('x - (-2/3) + 0 = 0')
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'