El viernes, 19 de septiembre de 2014 08:34:05 UTC-5, David P. Sanders escribió: > > Hi, for a package I'm writing (or, more precisely, trying to write), I > need to do the following: > > Change `:(3 + pi)` > into `:(3 + big(pi))` > or `:(BigFloat(3) + BigFloat(pi))` >
I forgot to say that I need to do this so that I can perform the calculations with different rounding modes. > > Basically I need to apply `BigFloat` to every symbol in the expression. (I > believe that it would be sufficient to wrap `MathConst`s in `big`, but > converting everything to BigFloat is probably a good idea.) > > This is my first foray into parsing etc. I'm guessing there's a package > that allows me to do this easily -- could someone please point it out? > Or how should I go about this? > > In principle the expressions could be more complicated, e.g. `(3 + pi) * > (2.5 - e)` > > Thanks, > David. >
