Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!hc!lanl!beta!dd From: dd@beta.lanl.gov (Dan Davison) Newsgroups: comp.lang.fortran Subject: Re: CFT/CFT77 gotcha Summary: no warning Message-ID: <23281@beta.lanl.gov> Date: 25 Jan 89 03:25:15 GMT References: <23252@beta.lanl.gov> <50500099@uxe.cso.uiuc.edu> Organization: Los Alamos National Laboratory Lines: 35 In article <50500099@uxe.cso.uiuc.edu>, hirchert@uxe.cso.uiuc.edu writes: > dd@beta.lanl.gov writes > >I came across an interesting non-bug in CFT77 today. A program > >fragment: > > a = 6.0 > > b = 3.0 > > i = a / b > > > >gave the result "2" in CFT on a X/MP-48 and "1" in CFT77 on the > >same machine. > [...] In developing CFT77, CRAY recognized that this > extra multiply slowed down all divides in this kind of situation, not just > those that were expected to be exact and that it could be confusing to get > different results depending on whether or not you assigned the intermediate > REAL quotient to a variable, so they chose not to do "strong rounding" in this > case and instead issue a warning message. (Did you ignore this warning message, > dd?) There was no warning issued! The compiler didn't blink on it. And thanks very much for an excellent discussion of what was going on. [inews fodder] dan davison/theoretical biology/t-10 ms k710/los alamos national laboratory los alamos, nm 875545/dd@lanl.gov (arpa)/dd@lanl.uucp(new)/..cmcl2!lanl!dd "Freedom is a heavy load, a great and strange burden for the spirit to undertake. It is not easy. It is not a gift given, but a choice made, and the choice may be a hard one." ...Le Guin, _The Farthest Shore_