is it possible to evaluate symbolic formula using postfix and stack?
postfix and stack can evaluate numerical formula, if apply to symbolic formula
is it possible to evaluate symbolic formula using postfix and stack? i.e.eval开发者_开发技巧uate all bracket formula times bracket formula
(x^2+y^2)*(x+x^2*y)+x*(x+y^2*x) example, it is for my lesiure activity. As i can not post question with any accounts now. And i closed computer last night. I can not make comment any more.
is it possible to evaluate symbolic formula using postfix and stack?
(x^2+y^2)*(x+x^2*y)+x*(x+y^2*x) example
Sure you can! In postscript:
%!
/f {
/y exch def
/x exch def
x x mul y y mul add
x x 2 y mul pow add mul
x x y 2 x mul pow add mul add
} def
精彩评论