Re: The side-effects of mixing TraditionalForm inside expressions.

• To: mathgroup at smc.vnet.net
• Subject: [mg110790] Re: The side-effects of mixing TraditionalForm inside expressions.
• From: Andrzej Kozlowski <akozlowski at gmail.com>
• Date: Tue, 6 Jul 2010 05:03:38 -0400 (EDT)
• References: <201007051002.GAA15102@smc.vnet.net>

```This information is very misleading because what you have observed has
nothing in particular to do with TraditionalForm. To see that, replace
TrditionalForm with InputForm or StandardForm and see what happens.
All these "forms" are meant only for the purpose of formatting and
should not be used inside computations as they are not stripped of after
evaluation (as, for example, Unevaluted is).

E.g:

1 + InputForm[1]

1+1

FullForm[%]

Plus[1,InputForm[1]]

vs

1 + Unevaluated[1]

2

Andrzej Kozlowski

On 5 Jul 2010, at 19:02, Nasser M. Abbasi wrote:

>
> FYI,
>
> When I typed the following:
>
> -----------------------------
> Clear[z]
> c = 1 + I; p = -9 + 3*I; t = 3.3;
> d = 1 - Exp[t*p]/z;
>
> expr2 = c/d;
>
> (expr1 - expr2) /. z -> 1
> --------------------------------
>
> I was expecting to get ZERO, as I do when I do not use TraditionalForm,
>
> (-0.9999999999999455 - 0.9999999999998298*I) + (1 + I)/
>    1.0000000000001124` + 5.779350816615805`*^-14 I
>
>
> "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.
>
> --Nasser
>
>

```

• Prev by Date: Re: Change Default Button Method
• Next by Date: overloading a function name in a package? How to query all names?