Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!rice!sun-spots-request From: caspar@wn2.sci.kun.nl (Caspar Terheggen) Newsgroups: comp.sys.sun Subject: Problem converting float -> double complex Keywords: Miscellaneous Message-ID: <2285@brazos.Rice.edu> Date: 19 Oct 89 09:49:46 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 26 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 167, message 8 of 17 This article is cross posted to two groups because I don't know whether it's a Fortran or a Sun question. Can someone explain this behavior? Is it valid Fortran77? Script started on Thu Oct 12 09:30:00 1989 % more try.f complex*16 z1,z2 z1 = 1.0 z2 = 1.0/1.0 write(*,*) z1,z2 end % make try f77 -sun4 -o try try.f try.f: MAIN: % try ( 1.0000000000000, 0.) ( 25.968750000000, 0.) % exit script done on Thu Oct 12 09:30:20 1989 Why did the conversion to complex*16 go right in one case and wrong in the other? I would expect that in both cases a real*4 must be converted to complex*16. I am running SunOS 4.0.3_Export #1 on a Sun4. As for the compiler: strings /usr/bin/f77 gives (among others) @(#)compile.c 1.70 88/04/18 SMI. Any help (e-mail or followup) is appreciated. Thanks in advance.