Closed leesugil closed 5 months ago
related issue
isolating to calcExpr, it seems to work fine (to the current version's standard) with parsing:
symbols: "f" = "a x^2 + b x^1 + c x^0" "g" = "y f" "h" = "g z" "i" = "-1 h" "j" = "i * -1" "x" = "2" "y" = "3" "z" = "7"
this is when i nullified x, y, z again. seems like calcExpr problem?
update direction: assume an expression is distributed. like -2 b a 3 / c 2 d 6
each term between +, - are a product of and /. for parts with , using commutativity, sort their order in lexicon order. put numbers in front always. like -6 a b / 12 c d
then do the number calculation to yield -0.5 a b / c * d
memo: decide how to handle a / b / d? the current module reads it as a / (b / d)
resolved
f = a x^2 + b x^1 + c x^0 x = 2 y = 3 g = y f ==> 3 a 4 + 3 b 2 + 3 c 1
i want the outcome to be ==> 12 a + 6 b + 3 * c