Re: Re: More /.{I->-1} craziness
- To: mathgroup at smc.vnet.net
- Subject: [mg106552] Re: [mg106525] Re: More /.{I->-1} craziness
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Sat, 16 Jan 2010 06:10:50 -0500 (EST)
- References: <hhf5s3$h4o$1@smc.vnet.net> <hhhmhl$o48$1@smc.vnet.net> <201001150820.DAA29809@smc.vnet.net>
AES wrote: > In article <hhhmhl$o48$1 at smc.vnet.net>, > Valeri Astanoff <astanoff at gmail.com> wrote: > >> Imho, when applying a rule lhs -> rhs >> it's a risky practice to use the same symbol >> in 'lhs' and 'rhs', because, very often, there is >> no easy way to check what has been done. >> >> Anyway, for occasional users, you're right : it's crazy! >> > > Thank you -- that's really my primary point. > > And I'd add: it's damaging (to users, and to Mathematica). > > As for writing rules, I'd not even try writing something compound, like > a + b or especially something like 1 + I, on the lhs, because I'd have > no intuition as to how this would work (how spaces would be handled, > etc.) > > But a single character on the lhs? It works correctly AFAIK for every > other single-character in the alphabet. Why shouldn't one expect it to > work for I? "[W]ork for me" (let's try to use correct grammar here). In[1]:= D[Sin[x], x] /. D -> f Out[1]= Cos[x] In[3]:= Exp[I*Pi] /. Pi -> E Out[3]= -1 In[4]:= Exp[I*Pi] /. I -> E Out[4]= -1 In[5]:= N[Pi] /. N -> P Out[5]= 3.14159 In[14]:= Cos[x] + O[x]^2 /. O -> P Out[14]= SeriesData[x, 0, {1}, 0, 2, 1] Daniel Lichtblau Wolfram Research
- References:
- Re: More /.{I->-1} craziness
- From: AES <siegman@stanford.edu>
- Re: More /.{I->-1} craziness