Re: Symbolic complex conjugation
- To: mathgroup at smc.vnet.net
- Subject: [mg26199] Re: Symbolic complex conjugation
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Thu, 30 Nov 2000 22:02:15 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
There have been many recent responses to the question on complex conjugation using: expr/. Complex[0,n_] -> -Complex[0,n] or expr/. Complex[m_,n_] -> Complex[m,-n] -------------------- I don't recommend you do it that way. Consider the following: In[1]:= n=567.25; m=345.5; Now suppose you do a lot of work, after which (m) and (n) still have the values above. .... .... .... In[143]:= (2-3 I) + x /.Complex[m_,n_] -> Complex[m,-n] Out[143]= (345.5-567.25 I) + x Oh that's awful! Instead use the following. In[144]:= (2-3 I) + x /.Complex[m_,n_] :> Complex[m,-n] Out[144]= (2 + 3 I) + x -------------------- Regards, Ted Ersek Download Mathematica tips, tricks from http://www.verbeia.com/mathematica/tips/Tricks.html