Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

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



  • Prev by Date: Re: NDSolve and step-size control
  • Next by Date: Re: copy/paste of exponents
  • Previous by thread: Re: What's up with missing contour labels in Mathematica 7.0.0 (OS X/Intel)?
  • Next by thread: Re: Typesetting bug