leesugil / symbolic

Symbolic calculator for arithmetic operations with fractions
GNU General Public License v3.0
1 stars 0 forks source link

-x vs -1 * x #4

Closed leesugil closed 5 months ago

leesugil commented 5 months ago

f = -x x = 2 doesn't yield f = -2 because -x != -1 * x in the current version. x and -x are considered as two different variables

leesugil commented 5 months ago

wip simple lines like f = -x would work fine when x = 2, for example, but there are still errors in the following case

expr->name: -1 y a 4 + -1 y b 2 + y c 1

removed expr:

symbols: "f" = "a x^2 + b x^1 + c x^0" "g" = "y f" "h" = "-1 * g" "x" = "2"

leesugil commented 5 months ago

this error is from distExpr.

-1 (a + b + c) ==> -1 a + -1 * b + c

working on the issue now

leesugil commented 5 months ago
Screenshot 2024-02-01 at 12 31 37 PM

problem

leesugil commented 5 months ago

resolved