soegaard / racket-cas

Simple computer algebra system
60 stars 10 forks source link

Missing parenthesis around negative number in factor in unnormalized expression #28

Open soegaard opened 1 month ago

soegaard commented 1 month ago

Simpler example:

> (!v '(* 3 1 -2))
"$3\\cdot -2$"
> (!v '(+ (* 3 (expt 1 2)) (* 3 1 -2) (expt -2 2)))
"$3\\cdot 1^{2}+3\\cdot {-2}+(-2)^{2}$"