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