clojure-numerics / expresso

Clojure library for symbolic computation
314 stars 20 forks source link

simplify solve output #22

Open mschuene opened 8 years ago

mschuene commented 8 years ago

(solve '[x y](ex %28= y %28 x 4/3%29%29) ;; y = 4/3 x (ex (= y (+ 1 -1 (* x 4/3))))) ;; y = 4/3 x returns #{{x (\ (- _0) -3/4), y _0}} , which is correct but can be simplified further to

{{x (* _0 3/4), y _0}}

Vaguery commented 8 years ago

Well, technically it can be simplified to #{{x _0, y (* 4/3 _0)}} (if I understand the notation correctly).