MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

The side-effects of mixing TraditionalForm inside expressions.


When I typed the following:

c = 1 + I; p = -9 + 3*I; t = 3.3;
d = 1 - Exp[t*p]/z;

expr1 = c/TraditionalForm@d;
expr2 = c/d;

(expr1 - expr2) /. z -> 1

I was expecting to get ZERO, as I do when I do not use TraditionalForm, 
but instead got:

(-0.9999999999999455 - 0.9999999999998298*I) + (1 + I)/
    1.0000000000001124` + 5.779350816615805`*^-14 I

Then I read in the help for TraditionalForm

"Output from TraditionalForm cannot necessarily be given as unique and 
unambiguous input to Mathematica"

And the above seems to explain this result. Too bad, because I wanted to 
use TraditionalForm inside an expression to format parts of it using a 
function which requires this wrapper.

My lesson of the day: do not use TraditionalForm inside expressions.


  • Prev by Date: Re: function reduction
  • Next by Date: Re: precedence for ReplaceAll?
  • Previous by thread: Re: Wolfram Alpha app for iPhone is now €0.79
  • Next by thread: Re: The side-effects of mixing TraditionalForm inside expressions.