MathGroup Archive 1998

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

Search the Archive

Re: Complex -> List does not work



David

> One of the basic principles of replacement rules is that replacements
> are not made inside of atomic expressions.
> ...........
> When you enter 2 + 3 I, or Complex[2, 3], the input is a normal expression, 
> not an atom.
> The corresponding atomic complex number is constructed only when these
> inputs are evaluated.

How about the following

In[1]:=
Complex[2,3]/.Complex[x_,y_]->List[x,y]

Out[1]=
{2, 3}


and 

In[43]:=
Complex[2,3]

Out[2]=
2 + 3 I

In[3]:=
%/.Complex[x_,y_]->List[x,y]

Out[3]=
{2, 3}


-- 
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642




  • Prev by Date: Re: Diamond Video card problems?
  • Next by Date: compiled functions
  • Prev by thread: Re: Complex -> List does not work
  • Next by thread: MathLive Professional and Mathematica 3.01