home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4439 < prev    next >
Encoding:
Text File  |  1992-11-24  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!destroyer!cs.ubc.ca!fs1.ee.ubc.ca!davem
  3. From: davem@ee.ubc.ca (david michelson)
  4. Subject: Re: a question on ATAN function
  5. Message-ID: <1992Nov24.034002.29695@ee.ubc.ca>
  6. Organization: University of BC, Electrical Engineering
  7. References: <dedmunds.722548228@sfu.ca> <By6v1E.LsB@news.cso.uiuc.edu>
  8. Date: Tue, 24 Nov 1992 03:40:02 GMT
  9. Lines: 18
  10.  
  11. In article <By6v1E.LsB@news.cso.uiuc.edu> ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi) writes:
  12. >In article <dedmunds.722548228@sfu.ca>, dedmunds@selkirk.sfu.ca (Darran Edmundson) writes:
  13. >|>I'd like to pose a neophyte question on using the arctan function to
  14. >|>calculate the phase angle of a complex variable (i.e. \theta = atan(v/u)
  15. >|>where u and v are the real and complex parts of my imaginary number
  16. >|>respectively). 
  17. >
  18. >atan2, which takes u and v as two separate arguments, is what
  19. >you want!
  20.  
  21. However, ATAN2(,) is undefined if both arguments are 0.0 so you'll
  22. have to test for that and assign an arbitrary value if it occurs.
  23.  
  24. --
  25. Dave Michelson
  26. davem@ee.ubc.ca
  27.  
  28.  
  29.