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: [mg105873] Re: [mg105836] Marbles.nb [was Re: CellChangeTimes?]
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 22 Dec 2009 04:07:14 -0500 (EST)
  • References: <hgidat$o2q$1@smc.vnet.net> <hgl3e5$14p$1@smc.vnet.net> <12241337.1261386593213.JavaMail.root@n11>

I get:

-(b - a) I
% /. Complex[a_, b_] -> Complex[a, -b]

I (a - b)
-I (a - b)

Have you changed your default input cell format to InputForm? That might
cause problems. Beginners should be careful about changing the default
preferences that come with Mathematica. (I wonder what the odds are that you
have changed cell grouping from Automatic to Manual?)

Also I -> -I IS NOT THE WAY TO OBTAIN A COMPLEX CONJUGATE, as you well know.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  



From: AES [mailto:siegman at stanford.edu] 

In article <hgl3e5$14p$1 at smc.vnet.net>, magma <maderri2 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 some 
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?




  • Prev by Date: 3d Mandelbulb Douady Julia
  • Next by Date: Re: Re: CellChangeTimes?
  • Previous by thread: Re: Marbles.nb [was Re: CellChangeTimes?]
  • Next by thread: Re: hyperlink back button