MathGroup Archive 2009

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

Search the Archive

Re: Marbles.nb [was Re: CellChangeTimes?]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105848] Re: Marbles.nb [was Re: CellChangeTimes?]
  • From: magma <maderri2 at gmail.com>
  • Date: Mon, 21 Dec 2009 06:55:26 -0500 (EST)
  • References: <hgidat$o2q$1@smc.vnet.net> <hgl3e5$14p$1@smc.vnet.net>

On Dec 21, 9:32 am, AES <sieg... at stanford.edu> wrote:
> In article <hgl3e5$14... at smc.vnet.net>, magma <mader... at gmail.com>
> wrote:
>
> > I am more interested in knowing why you seem to be using Show
> > Expression so often that this feature bothers you? I personally use it
> > veeery rarely . . . Show Expression has a very complex output and
> > IMO should only be used by "hackers" and not regular Mathematica users
> > . . . going so low level is not too time efficient for regular users.
>
> > If one wants to discover something
> > very special, it is faster to ask here in MathGroup.
> > If you want to see how things work internally (up to a certain level),
> > FullForm should be enough for regular Mathematica users
> > (that is anybody who is not a computer scientist).
>
> > So: why do you use Show Expression so often to be bothered by
> > CellChangeTimes ?
>
> Shown below are the entire contents of a notebook Marbles.com:  two
> "identical" Input cells; two mathematically but definitely not
> symbolically identical Output cells:
>
>    In[1]:= -(b-a)  I
>
>    Out[1]= I (a-b)
>
>    In[2]:= -(b-a) I
>
>    Out[2]= -I (-a+b)
>
> (The notebook itself can be downloaded from
> <http://www.stanford.edu/~siegman/Marbles.nb>.)
>
> I'm not playing tricks or games here.  The two Input cells are the only
> contents of Marble.nb.  The first Input cell was routinely copied and
> pasted into Marbles.nb from another notebook, which is long gone.  The
> second Input cell was typed in after noting a typographic oddity: the
> character spacing of the  -(b-a) portion is much more tightly spaced in
> the first cell than in the second.  
>
> Also, there's the further result that if you append /. {I->-I} to these
> two "identical" (or anyway, identical-seeming) Input cells, you get
> *opposite* results -- something which it seems to me should definitely
> not happen!  (or not without a warning at least)
>
> So, following many stern instructions from this group in earlier
> discussions to use FullForm[],  I wrapped FullForm[ ] around both of
> these Input cells, producing results which matched the differently
> appearing Outputs shown above.
>
> This application of FullForm perhaps also explains or excuses the
> different results obtained using the   I -> -I  substitution -- in so=
me
> people's minds, at least, though not in mine.
>
> Anyway, hoping to gain further understand, I then tried Show Expression
> on these Input cells, and got the results appended below:  (With very
> lengthy CellChangeTimes strings stripped out, of course)
>
>    Cell[BoxData[
>     RowBox[{
>      RowBox[{"-",
>       RowBox[{"(",
>        RowBox[{"b", "-", "a"}], ")"}]}], "  ", "I"}]], "Input"]
>
>    Cell["-(b-a) I", "Input"]
>
> which I think tells me something -- though I'm not sure what.
>
> If anyone from Wolfram wants to know how I got to this aberrant first
> cell, I can try to reconstruct this (it may have something to do with my
> earlier messing around with a modified Default stylesheet).
>
> But in any case:  Should these two Input cells really produce
> *different* results in response to a simple rule?  If the character "I"
> in two Input cells and the rule were replaced by characters "x" or "z"
> or anything other symbol, would one ever get different results?

Interesting example AES!
Indeed FullForm does not reveal anything.
Show Expression is what you need.
Let's call "mutated" the cell with
Cell["-(b-a) I", "Input"]
That's because it is not a normal input cell. I can only get it via
copying your cell.
It is viewed by Mathematica as a string (because of the "..."), but she makes
calculations with it.
You can see this by changing the mutated cell to
-(b-a+a)  I
and you see that Mathematica correctly adds the a's.
By the way, the number of spaces between ) and I is not relevant for
either the regular or the mutated cell.
Now, having reached my hacking incompetence level, I leave the experts
further investigate the matter.

Just a question....The nb was version 4.2, how come?


  • Prev by Date: intersection of two circles
  • Next by Date: 3D Animations
  • Previous by thread: Re: intersection of two circles
  • Next by thread: Re: Marbles.nb [was Re: CellChangeTimes?]