Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwvax!zazen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!tuegate.tue.nl!al!reuder From: reuder@lso.win.tue.nl (Peter Reuderink) Newsgroups: comp.lang.c++ Subject: c++ and complex numbers Keywords: c-language, complex numbers, complex functions Message-ID: <480@al.wfw.wtb.tue.nl> Date: 17 May 91 18:48:16 GMT Sender: reuder@wfw.wtb.tue.nl (Peter Reuderink) Organization: Eindhoven University of Technology, The Netherlands Lines: 34 Althoug I'm familiar with f.e. Pascal I always used FORTRAN (FORTRAN-IV; F77) for my programming. The main reason is that in FORTRAN it is possible to use complex numbers, while it offers an extensive set of intrinsic complex functions (CEXP,CSQRT,etc.), which are essential in wave-analysis. Although it is possible to define new types or records in Pascal, one is always confronted with problems when trying to write complex functions is Pascal since the output of a function can never be two values, i.e. real and imaginary. Therefore one is forced to use subroutines for even the most simple problems, making your code unreadable, and time-consuming. I was informed that originally in c-language it was not possible to use complex numbers in the way it's done in FORTRAN as well. However, can someone tell me if it can be done in c++?? Or are there any other languages able to deal with complex numbers. Not that I want to switch from FORTRAN to c, since many FEM-packages are programmed in FORTRAN, but I'm preparing "statements" for my thesis, and one is supposed to deal with programming and complex numbers. please answer on the net or my e-mail adress. Sincerely, Peter. ______________________________________________________________________ Sender: Peter Reuderink Adress: Eindhoven Univ. Technology WFW W-Hoog -1.131 Ici Jo-Jo-avec-le-gros-guele: P.O.Box 513 Il compte son argent. 5600 MB Eindhoven "Haut-les-mains!", the Netherlands dit commissaire Maigret. E-mail: reuder@wfw.wtb.tue.nl "Merde!" murmure Jo-Jo. ----------------------------------------------------------------------