8 Feb
2006
8 Feb
'06
5:42 p.m.
Dear Saurav, On Wed, 2006-02-08 at 07:28 -0500, Saurav Pathak wrote:
In real life, I get such strings from an external parser that converts MathML. Some functions are complicated and have other functions embedded---for instance exponentials. I don't want to further parse such a string.
What about defining your own function then. For instance, DECLARE_FUNCTION_2P(my_pow); REGISTER_FUNCTION(my_pow,dummy()); In that case you would only need to change the word "pow" in the output of your parser into "my_pow". After that you could use the constructor that makes an ex from a string and then you could get a real power object again by doing .subs(my_pow(wild(0),wild(1))==power(wild(0),wild(1)). Best, Chris