home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4427 < prev    next >
Encoding:
Text File  |  1992-11-23  |  901 b   |  27 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!destroyer!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!dedmunds
  3. From: dedmunds@selkirk.sfu.ca (Darran Edmundson)
  4. Subject: a question on ATAN function
  5. Message-ID: <dedmunds.722548228@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. Date: Mon, 23 Nov 1992 19:50:28 GMT
  9. Lines: 16
  10.  
  11. I'd like to pose a neophyte question on using the arctan function to
  12. calculate the phase angle of a complex variable (i.e. \theta = atan(v/u)
  13. where u and v are the real and complex parts of my imaginary number
  14. respectively).  Is it sufficient to test for u=0 (i.e. \theta = \pm \pi)
  15. to avoid problems?  What happens if the ratio exceeds range allowed
  16. for doubles or reals?  How do you avoid this problem?
  17.  
  18. (Now that I think about it, is it better to use arcsin or arccos?)
  19.  
  20. Thanks for you help.
  21.  
  22. -- 
  23.  
  24. Darran Edmundson
  25. darran@chaos.phys.sfu.ca
  26.  
  27.