String manipulation of type String substitution in mathematical expression

Posted by Peterstone on Super User See other posts from Super User or by Peterstone
Published on 2010-11-22T19:48:44Z Indexed on 2012/06/19 21:19 UTC
Read the original article Hit count: 291

Filed under:
|

Imagine something like

exp(49/200)+(x-49/200)

I want to pass as argument of the function "roundn" whatever operation that is not a addtion or a subtraction So my expresion became

roundn(exp(roundn(49/200,n)),n)+(x - roundn(49/200,n)

Well the expression I want to manipulate is this:

exp(49/200)+exp(49/200)*(x-49/200)+1/2*exp(49/200)*(x-49/200)^2+1/6*exp(49/200)*(x-       49/200)^3+1/24*exp(49/200)*(x-49/200)^4+1/120*exp(49/200)*(x-49/200)^5+1/720*exp(49/200)*(x-49/200)^6+1/5040*exp(49/200)*(x-49/200)^7+1/40320*exp(49/200)*(x-49/200)^8+1/362880*exp(49/200)*(x-49/200)^9+1/3628800*exp(49/200)*(x-49/200)^10+1/39916800*exp(49/200)*(x-49/200)^11

I´m looking for a method (That include whatever program) not based in lenguage programming, as much batch or somithing like that... Thank you!

© Super User or respective owner

Related posts about math

Related posts about string-manipulation