From: hoffman@xdelta.enet.dec.nospam (Hoff Hoffman)
Subject: Re: VAX D-Float format
Date: 1997/10/30 [thread overview]
Message-ID: <63b0b9$fs4@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.
Well, the VAX architecture predated the IEEE floating point
standards by a few years. :-)
:The format is as follows:
:
:bit 15: sign
:bit 14 - 7: Exponent
:bit 6 - 0: Exponent
:
:bit 16 to 63 is the fraction. I assume it is one fraction, however,
:the diagram in the book divided it into three equal parts. Like the
:exponent shown above.
Your book appears somewhat confused, as D_Float bits 6 through 0
are part of the fraction, not the exponent.
Here are the VAX F_Floating, D_Floating, G_Floating, and H_Floating
floating-point formats:
31 16 15 14 7 6 0
+-----------+--+-----+----------+ fraction normalized;
F | frac-1 |S | exp | frac-2 | exponent bias 128.
+-----------+-------------------+
31 16 15 14 7 6 0
+-----------+--+-----+----------+ fraction normalized;
D | frac-3 |S | exp | frac-4 | exponent bias 128.
+-----------+-------------------+
| frac-1 | frac-2 |
+-----------+-------------------+
31 16 15 14 4 3 0
+-----------+--+-------+--------+ fraction normalized;
G | frac-3 |S | exp | frac-4 | exponent bias 1024.
+-----------+-------------------+
| frac-1 | frac-2 |
+-----------+-------------------+
31 16 15 14 0
+-----------+--+----------------+ fraction normalized;
H | frac-7 |S | exp | exponent bias 16384
+-----------+-------------------+
| frac-5 | frac-6 |
+-----------+-------------------+
| frac-3 | frac-4 |
+-----------+-------------------+
| frac-1 | frac-2 |
+-----------+-------------------+
With the least significant to the most significant bits of the
fraction being listed from frac-1 to frac-n. S is the sign bit.
:Can someone help me with this format? How can I convert this binary
:data to a double float?
A double float using what format? On all recent OpenVMS releases,
there are library routines to convert this stuff for you -- without
access to these routines, we need to know what floating point format
you want to convert this format to...
To convert it to j-random format, you need to move the exponent and
the fraction into the appropriate fields. And DIGITAL VAX and Alpha
systems, as well as systems based on the Intel IA32 architecture are
little-endian, other platforms may use a big-endian scheme.
:Any help is greatly appreciated. Thanks.
Take a look at the OpenVMS Frequently Asked Questions (FAQ), and
see if the Floating Point information included there helps any.
(In addition to what is here.)
----------------------------------------------------------------------------
Hoff (Stephen) Hoffman OpenVMS Engineering h*ffman@xdelta.enet.dec.c*m
headers and addresses munged to avoid automated spammers: junk-e-mail
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 ` 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 ` VAX D-Float format John Laird
1997-10-30 5:00 ` Hoff Hoffman [this message]
1997-10-30 5:00 ` Steve Atkins
1997-10-31 5:00 ` Pedasmith
1997-10-30 5:00 ` Steve Lionel
1997-10-31 5:00 ` 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-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