home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!paladin.american.edu!europa.asd.contel.com!darwin.sura.net!spool.mu.edu!caen!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (Jim Giles)
- Subject: Re: SQRT
- Message-ID: <1992Sep10.164912.194@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <1992Sep10.133032.20560@morrow.stanford.edu>
- Distribution: ba
- Date: Thu, 10 Sep 1992 16:49:12 GMT
- Lines: 13
-
- In article <1992Sep10.133032.20560@morrow.stanford.edu>, francis@oas.stanford.edu (Francis Muir) writes:
- |> Can someone remind me whether 77 (or 90) allows the generic SQRT
- |> function to be used on complex numbers? And if so, which solution
- |> is returned, the one with a non-negative real part?
-
- In both standards, the generic SQRT works on COMPLEX. Both specify
- that the result is the one whose real part is non-negative, and when
- the real part is zero, the imaginary part will be non-negative.
- Of course, for all languages, the branch cuts are always the ones
- you don't want. I hope these are satisfactory to you.
-
- --
- J. Giles
-