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

MathGroup Archive 2010

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

Search the Archive

Re: replacement x->y except in Exp[x]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110900] Re: replacement x->y except in Exp[x]
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Sat, 10 Jul 2010 06:33:07 -0400 (EDT)

Actually I is a Symbol, before evaluation:

In[90]:= Head[Unevaluated[I]]

Out[90]= Symbol

but it is no loner one after evaluation:

In[91]:= Head[I]

Out[91]= Complex

Andrzej Kozlowski


On 10 Jul 2010, at 17:01, Murray Eisenberg wrote:

> I is not a "symbol"!
> 
> Head[I]
> Complex
> 
> 3+I /. I-> -I
> 3 + I
> 
> Head[2]
> Integer
> 
> (2/3) /. 2->5
> 2/3
> 
> Please stop beating the dead horse.
> 
> 
> On 7/8/2010 8:34 PM, AES wrote:
> 
>> ...Is it ever a good idea to use ReplaceAll to do word-processing-type
>> "global find and replace" changes like this?
>> 
>> Lengthy threads on this NG have pointed out the havoc that this can
>> wreak if the symbol I is among those replaced, particularly if one
>> attempts to do I ->  -I.
>> 
>> Or is I the _only_ symbol in the entire Mathematica vocabulary that
>> encounters this difficulty?
>> 
>> (I really would like to know the answer to this question, even if this
>> is entirely out of curiosity, not any real need.  I've asked it
>> previously, and never gotten an answer.)
> 
> 
> -- 
> Murray Eisenberg                     murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305
> 



  • Prev by Date: Re: 3D view direction
  • Next by Date: Re: How to *really* remove a symbol?
  • Previous by thread: Re: replacement x->y except in Exp[x]
  • Next by thread: Re: replacement x->y except in Exp[x]