From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4a4e6b427ee75acf X-Google-Attributes: gid1164f8,public From: carl@gerg.tamu.edu (Carl Perkins) Subject: Re: Precision on an Alpha Date: 1997/04/25 Message-ID: <25APR199706471078@gerg.tamu.edu>#1/1 X-Deja-AN: 237264846 Distribution: world References: X-Lunar-Date: 4 days, 20 hrs, 14 mins until the last quarter of the moon (U.T.) Organization: Geochemical and Environmental Research Group - TAMU News-Software: VAX/VMS VNEWS 1.50AAXP NNTP-Posting-Date: 25 Apr 1997 11:48:12 GMT Newsgroups: comp.sys.dec In article , macuda@ucdavis.edu (Marcus A. Cuda) writes... }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: }>I would guess that the Alpha machine is using the same technology DEC }>used with the VAX. 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. } }My question is: }Is the above statement correct? }Marcus Cuda Not even close. >From your mention of "f77", I assume you use Digital UNIX. I expect that DU always uses IEEE floating point. With that, *single* precision (REAL*4) should have exponents from about -38 to +38 (IEEE type S); double precision (REAL*8) should have exponents from -308 to +308 (IEEE type T). For REAL*16 it presumably uses IEEE type X which allows exponents from -4931 to +4931. Under VMS you could get about one more power of 10 in either direction with the use of F, G, and H VAX style formats rather than the IEEE. (In all the IEEE cases, at the negative end the exponents get more range from denormalized numbers as well.) The problem would either be a bug in the code or the use of some compiler switch that is making it use single precision on the Alpha instead of double precision. Under VMS there is a /REAL_SIZE=n qualifier to determine what size to use if "REAL" is specified rather than "REAL*n" and this defaults to 32 bits, i.e. single precision, for VMS - if you are doing something similar on DU, remember that double precision has a size of 64 bits but the default is probably only 32 which would make any declarations that use "REAL" without a "*8" (or "*16") be interpreted as single precision. --- Carl