From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,c730bcbcd6fff2a1,start X-Google-Attributes: gid1094ba,public X-Google-Thread: 1164f8,c730bcbcd6fff2a1,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1995-02-06 16:25:13 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!uunet!easix!gtnduss1.du.gtn.com!news.uni-stuttgart.de!news.rhrz.uni-bonn.de!news.rwth-aachen.de!news.dfn.de!RRZ.Uni-Koeln.DE!wmwap1.math.uni-wuppertal.de!wppc9.physik.Uni-Wuppertal.DE!wolter From: wolter@wppc9.physik.Uni-Wuppertal.DE (Robert Wolter) Newsgroups: comp.sys.dec,comp.lang.fortran Subject: DEC F77 on Ultrix 4.3a and OSF 1.2 vs f2c on Linux 1.1.x Date: 7 Feb 1995 00:25:13 GMT Organization: University of Wuppertal Message-ID: <3h6el9$jtr@wmwap1.math.Uni-Wuppertal.DE> NNTP-Posting-Host: wppc9.physik.uni-wuppertal.de Summary: f2c better than DEC FORTRAN?!? X-Newsreader: TIN [version 1.2 PL2] Xref: nntp.gmd.de comp.sys.dec:21552 comp.lang.fortran:17383 I just got a very strange experience: consider a REAL variable RBUF, a REAL array XREC(A), where A is an INTEGER and set to some value, say 20 PARAMETER(A=20) Now consider the intrinsic function LOG10: it takes one argument, a REAL variable. My experience now is as follows: I assign IF (XREC(A).GT.0.0) THEN R=LOG10(XREC(A)) ENDIF and it works for several times on either a DECstation running Ultrix 4.3a or DEC Alpha running OSF 1.2. Then the system suddenly reports a floating point error, divide by zero. I then compile and run the program on a PC 486 running Linux 1.1.73 and using f77 from the f2c package, and it works! Now I assign the argument to a buffer variable: IF (XREC(A).GT.0.0) THEN RBUF=XREC(A) R=LOG10(RBUF) ENDIF and it works also on Ultrix and OSF systems! My question now: Is this a bug or a feature? Can DEC managers live in peace with the fact that a free FORTRAN compiler (f2c) works more intelligent than a commercial high-priced product :) ? Cheers Robert Wolter wolter@wppc9.uni-wuppertal.de