Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: johnson@atc.ameritel.net
Subject: VAX Double-precision Floating Point
Date: 1995/09/06	[thread overview]
Message-ID: <42k4kd$bmu@news.ameritel.net> (raw)

Hello,

I have some hex patterns which represent 64-bit floating point values generated by a VAX. They are as follows:

1) f0 49 71 e7 85 6a 48 b3
2) 88 b6 00 30 00 00 00 00
3) d4 c0 9e ba 4e ea e0 4f
4) d2 3c b4 3f 00 00 00 00
5) a1 46 9d 0d 00 fa 00 00
6) 18 40 22 1b b9 b0 a0 32
7) 76 40 f3 1e bc af c0 b7
8) 36 c1 63 b4 53 33 68 ab
9) 09 b3 df 19 2d 85 58 e8

I would like to know what floating point numbers correspond to these hex dumps. I don't know whether they were 
generated using the G-FLOAT or the D-FLOAT, so for anyone who responds with some numbers, please indicate which 
one was used for your calculations.

What I ultimately need to figure out is how to converts the 64-bit VAX float to a 64-bit IEEE Standard float, 
used by a Motorola processor. I've tried numerous methods of swapping bytes and shifting bits, but the numbers 
that I get look pretty far out. It would be great if I knew what the nubers were supposed to be...

If anyone can pass along the correct conversion algorithm, this also would be appreciated. The one we've been 
using mostly during testing is:


         Byte Number
       ---------------
VAX  : 0 1 2 3 4 5 6 7
IEEE : 1 0 3 2 5 4 7 6

I would appreciate it if someone with access to a VAX would memcpy the above hex patterns into a "double" (I'm 
using C, but I guess any other language would work just as well?) and send me the resulting floating point 
numbers. For those who only want to test with one of the hex patterns, please use #5 (a1 46 9d 0d 00 fa 00 00).

Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks 

Tony J.



                 reply	other threads:[~1995-09-06  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
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