开发者

is it possible to evaluate symbolic formula using postfix and stack?

开发者 https://www.devze.com 2023-03-21 10:09 出处:网络
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 tim

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
0

精彩评论

暂无评论...
验证码 换一张
取 消