Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Output complex numbers in polar (exponential) form?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121175] Output complex numbers in polar (exponential) form?
  • From: "Mr.CRC" <crobcBOGUS at REMOVETHISsbcglobal.net>
  • Date: Fri, 2 Sep 2011 03:29:48 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi:

For ex:

In[2]:= ToExp[z_] := Abs[z] E^(I Arg[z])

In[4]:= ToExp[3 + 4 I]

Out[4]= 5 E^(I ArcTan[4/3])


However, this converts back to rectangular form when a float is involved:

In[5]:= ToExp[3 + 4. I]

Out[5]= 3.+ 4. I


Any idea how to make a consistent exponential complex number output?


Thanks.


-- 
_____________________
Mr.CRC
crobcBOGUS at REMOVETHISsbcglobal.net
SuSE 10.3 Linux 2.6.22.17




  • Prev by Date: FindFit on only real parameters
  • Next by Date: Assembling PDFs into a PDF document?
  • Previous by thread: FindFit on only real parameters
  • Next by thread: Re: Output complex numbers in polar (exponential) form?