From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4a4e6b427ee75acf,start X-Google-Attributes: gid1164f8,public From: Jeffrey Potoff Subject: Re: Precision on an Alpha Date: 1997/04/24 Message-ID: <335FE9E7.41C6@latoso.cheme.cornell.edu>#1/1 X-Deja-AN: 237136639 Sender: jjp7@cornell.edu (Verified) References: Organization: Cornell University Newsgroups: comp.sys.dec Marcus A. Cuda wrote: > > Hi, > We are running into a problem on a DEC AlphaStation 4/233. > When running a routine in an econometrics package, we get the following > error: > > > forrtl: error (65): floating invalid > > IOT trap (core dumped) > > The person who wrote the package blames the Alpha chip for this problem: That would be incorrect. There is a bug in the code. > >I would guess that the Alpha machine is using the same technology DEC > >used with the VAX. That would also be incorrect. > The VAX machine always had a problem in that the > >range of values that it could represent in double precision was only > >10**(-38) to 10**(+38). Other current machines, including PCs have a > >range of exponents in excess of 300. Our Alpha can go up from 10**(-300+) to 10**(+300+) > > The package is distributed as FORTRAN source code. When compiled on a > SUN/UNIX or INTEL/WINDOWS machines the problem does not occur. > Most likely the problem is in the way the variables are typed. The program could be trying to stuff a double precision value into a real, and reals only go up to about 10**(38). Or, you could be getting a -infinity or a +infinity somewhere. On some systems (AIX xlf Fortran comes to mind) the program will keep running. Under MS Powerstation Fortran the program will crash, on Suns (older versions of F77) it would keep running. > If anyone knows a switch for f77 that would solve this problem, it > would be greatly appreciated. > Try -fpconstant (promotes single precision constants assigned to double precision variables to double precision) and -r8 (sets the default real kind as double precision). See the man page for f77. Jeff