Typesetting bug
- To: mathgroup at smc.vnet.net
- Subject: [mg96405] Typesetting bug
- From: replicatorzed at gmail.com
- Date: Fri, 13 Feb 2009 03:40:38 -0500 (EST)
Dear Group,
I don't know whether this "feature" is widely known or not, but it
surely gave me an hour of scratching my head, buried deep inside a
calculation:
In[7]:= n = .5;
x = 1;
ax = 1;
{(ax^n), x^n, ax^n - x^n}
Out[10]= {1, 1, 0}
In[11]:= max = 1;
{(max^n), x^n, max^n-x^n}
Out[12]= {1, 1, -1}
This inconsistency happens only if exponents are typed in as real
superscripts with Ctrl+^. A FullForm reveals an underlying Times in
the last case, which ultimately is responsible for the wrong answer.
Furthermore, max^n does not work as intended if typed and evaluated in
one call, as follows:
max <Ctrl+^> n <enter> x <Shift+Enter>
because it is interpreted as a product of max^n and x.
Istvan Zachar
- Follow-Ups:
- Re: Typesetting bug
- From: Curtis Osterhoudt <cfo@lanl.gov>
- Re: Typesetting bug