Complex -> List does not work
- To: mathgroup@smc.vnet.net
- Subject: [mg10495] Complex -> List does not work
- From: Gianluca Gorni <gorni@dimi.uniud.it>
- Date: Tue, 20 Jan 1998 02:22:45 -0500
Hello! I naively tried the following way of turning a complex number into a couple of real numbers: 2 + 3 I /. Complex -> List but it gives me back 2 + 3 I even though the full form of 2+3I is Complex[2,3]. The reverse however is possible: {2,3}/.List->Complex gives 2+3I The help browser says that "you have to use Re and Im to extract parts of Complex numbers". Why this exception to the basic principles of replacement rules? Gianluca Gorni %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Gianluca Gorni Universita` di Udine Dipartimento di Matematica e Informatica via delle Scienze 208 I-33100 Udine UD Italy Ph.:(39) (432) 558422 Fax:(39) (432) 558499 mailto:gorni@dimi.uniud.it http://www.dimi.uniud.it