fjames86 / fpoly

Manipulate dense multivariate polynomials
0 stars 0 forks source link

compiled polynomials #26

Closed fjames86 closed 11 years ago

fjames86 commented 11 years ago

should be possible to write a macro that "compiles" a polynomial structure into a standard function. e.g. something like

(defpoly myp #{x + y^2})

->

(defun myp (x y) (+ 0 (* 1 x) (* 0 y) (* 0 x x) (* 0 x y) (* 1 y y)))

Could of course easily make it more efficient by not including zero-coefficient terms and tracking exponents.

fjames86 commented 11 years ago

started writing it, work in progress.