home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / fortran / 3505 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.1 KB  |  26 lines

  1. Newsgroups: comp.lang.fortran
  2. 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
  3. From: jlg@cochiti.lanl.gov (Jim Giles)
  4. Subject: Re: SQRT
  5. Message-ID: <1992Sep10.164912.194@newshost.lanl.gov>
  6. Sender: news@newshost.lanl.gov
  7. Organization: Los Alamos National Laboratory
  8. References:  <1992Sep10.133032.20560@morrow.stanford.edu>
  9. Distribution: ba
  10. Date: Thu, 10 Sep 1992 16:49:12 GMT
  11. Lines: 13
  12.  
  13. In article <1992Sep10.133032.20560@morrow.stanford.edu>, francis@oas.stanford.edu (Francis Muir) writes:
  14. |> Can someone remind me whether 77 (or 90) allows the generic SQRT
  15. |> function to be used on complex numbers? And if so, which solution
  16. |> is returned, the one with a non-negative real part?
  17.  
  18. In both standards, the generic SQRT works on COMPLEX.  Both specify
  19. that the result is the one whose real part is non-negative, and when 
  20. the real part is zero, the imaginary part will be non-negative.
  21. Of course, for all languages, the branch cuts are always the ones
  22. you don't want.  I hope these are satisfactory to you.
  23.  
  24. -- 
  25. J. Giles
  26.