From: carl@gerg.tamu.edu (Carl Perkins)
Subject: Re: Precision on an Alpha
Date: 1997/04/25 [thread overview]
Message-ID: <25APR199706471078@gerg.tamu.edu> (raw)
In-Reply-To: MPG.dc94838f95f8d4a989680@news
In article <MPG.dc94838f95f8d4a989680@news>, 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
prev parent reply other threads:[~1997-04-25 4:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-24 4:00 Precision on an Alpha Marcus A. Cuda
1997-04-24 4:00 ` Ron Natalie
1997-04-25 4:00 ` Phillip Helbig
1997-04-24 4:00 ` Jeffrey Potoff
1997-04-26 4:00 ` Peter Sanger
1997-05-01 4:00 ` Keith Bierman QED
1997-04-25 4:00 ` Don Dossa
1997-04-25 4:00 ` Carl Perkins [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox