From: lionel@mail.dec.com (Steve Lionel)
Subject: Re: VAX D-Float format
Date: 1997/10/30 [thread overview]
Message-ID: <63aalh$7rj@usenet.pa.dec.com> (raw)
In-Reply-To: 34575f82.182344367@serve.installshield.com
In article <34575f82.182344367@serve.installshield.com>,
chiehcheng@geocities.com (Chieh Cheng) writes:
|>I am trying to decode and decipher Intergraph Microstation's Design
|>file format. It uses the VAX D-Float format. Although it is also 64
|>bit long, it is somewhat different from the IEEE double float format.
Here's the description of VAX floating formats from the OpenVMS FAQ:
VAX2. What is the layout of the VAX floating point format?
The VAX floating point format is derived from one of the PDP-11 FP formats,
which helps explain its strange layout. There are four formats defined:
F 32-bit single-precision, D and G 64-bit double-precision and H 128-bit
quadruple precision. For all formats, the lowest addressed 16-bit "word"
contains the sign and exponent (and for other than H, some of the most
significant fraction bits). Each successive higher-addressed word contains
the next 16 lesser-significant fraction bits. Bit 15 of the first word is the
sign, 1 for negative, 0 for positive. Zero is represented by a biased
exponent value of zero and a sign of zero; the fraction bits are ignored (but
on Alpha, non-zero fraction bits in a zero value cause an error.) A value
with biased exponent zero and sign bit 1 is a "reserved operand" - touching
it causes an error - fraction bits are ignored. There are no minus zero,
infinity, denormalized or NaN values.
For all formats, the fraction is normalized and the radix point assumed to be
to the left of the MSB, hence 0.5 <= f < 1.0. The MSB, always being 1, is
not stored. The binary exponent is stored with a bias varying with type in
bits 14:n of the lowest-addressed word.
Type Exponent bits Exponent bias Fraction bits (including hidden)
==========================================================================
F 8 128 24
D 8 128 56
G 11 1024 53
H 15 16384 113
The layout for D is identical to that for F except for 32 additional
fraction bits.
Example: +1.5 in F float is hex 000040C0 (fraction of .11[base 2], biased
exponent of 129)
--
Steve Lionel mailto:Steve.Lionel@digital.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on DIGITAL Fortran, see http://www.digital.com/fortran
next prev parent reply other threads:[~1997-10-30 5:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-29 5:00 VAX D-Float format Chieh Cheng
1997-10-30 5:00 ` John Laird
1997-10-30 5:00 ` Gregg E Economou
1997-10-31 5:00 ` Chieh Cheng
1997-11-05 5:00 ` WTB: Iomega Zip Drive Jerome Fine
[not found] ` <199711051454.JAA02820@dbit.dbit.com>
1997-11-05 5:00 ` Jerome Fine
1997-10-30 5:00 ` Steve Lionel [this message]
1997-10-31 5:00 ` VAX D-Float format Dik T. Winter
1997-10-31 5:00 ` John Wilson
1997-11-03 5:00 ` Dik T. Winter
1997-11-03 5:00 ` Chieh Cheng
1997-11-05 5:00 ` Steve Lionel
1997-11-06 5:00 ` Philippe Pouliquen
1997-11-10 5:00 ` John Laird
1997-10-30 5:00 ` Steve Atkins
1997-10-31 5:00 ` Pedasmith
1997-10-30 5:00 ` Hoff Hoffman
1997-11-05 5:00 ` John Foust
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