Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!csd4.milw.wisc.edu!zdenko From: zdenko@csd4.milw.wisc.edu (Zdenko Tomasic) Newsgroups: comp.arch Subject: Re: FORTRAN Horror Message-ID: <5330@uwmcsd1.UUCP> Date: 23 Mar 88 04:31:45 GMT References: <24861@yale-celray.yale.UUCP> <1135@pembina.UUCP> <2424@saturn.ucsc.edu> <25461@yale-celray.yale.UUCP> <10037@steinmetz.steinmetz.ge.com> <6328@ames.arpa> Sender: daemon@uwmcsd1.UUCP Reply-To: zdenko@csd4.milw.wisc.edu (Zdenko Tomasic) Organization: University of Wisconsin-Milwaukee Lines: 55 Keywords: arithmetic IF, FORTRAN In article <6328@ames.arpa> eugene@pioneer.UUCP (Eugene N. Miya) writes: >In article <10037@steinmetz.steinmetz.ge.com> davidsen@crdos1.UUCP (bill davidsen) writes: >> The arithmetic if is one of the few good things in FORTRAN, > >Arithmetic is FORTRAN is an abortion! No numerical analyst worth his (her) ^^^^^^^^ shades of the Supreme Court decision, any verdict on ADATRAN ? :-) >salt would truncate or specify user specified rounding (See the SIGPLAN >paper entitled Benchmark Semantics a month ago). This is one of the reasons >for the IEEE Floating Point Standard. These are kludges and other short cuts ^^^^^^^^^^^^^^ >from the days when good floating point rounding "cost more." ^^^^^^^^^^^^^^ The arithmetic IF is not restricted to floating point, its is fine for integers. However you are right about FP, it is definitely very IFFY there. For very few cases arithmetic IF might be handy (i.e. all 3 branches are different), but in most cases it is awkward since it forces at least 2 labels to be used and gives a solid chance of writing a dead code. (It is a lot of fun to confuse a code reader, he/she has really nothing better to do or be amused with :-)). The first label following IF is really unnecessary if you believe in top-down approach, but the syntax mandates it. It is certainly very baroque, but how much code will break without it? (don't answer that!). > >From the Rock of Ages Home for Retired Hackers: > >--eugene miya, NASA Ames Research Center, eugene@ames-aurora.ARPA > "You trust the `reply' command with all those different mailers out there?" > "Send mail, avoid follow-ups. If enough, I'll summarize." > {uunet,hplabs,hao,ihnp4,decwrl,allegra,tektronix}!ames!aurora!eugene This discussion is extremely architectually relevant (IBM 70? :)), anybody working on arithmetic if machine? (very IFFy indeed). Zdenko Tomasic UWM, Chem. Dept. Milwaukee,WI,53201 __________________________________________________________ UUCP: ihnp4!uwmcsd1!csd4.milw.wisc.edu!zdenko ARPA: zdenko@csd4.milw.wisc.edu __________________________________________________________ Zdenko Tomasic UWM, Chem. Dept. Milwaukee,WI,53201 __________________________________________________________ UUCP: ihnp4!uwmcsd1!csd4.milw.wisc.edu!zdenko ARPA: zdenko@csd4.milw.wisc.edu __________________________________________________________