> Can someone provide me with some insight on how to convert a VAX double
> (stored in a binary file from a compiled VAX basic program) to an x86 (or
> any other architecture for that matter) Unix (specifically Linux) system?
> What I have is a binary file stored by a VAX basic program running on VMS
> 7.1 on a VAX 6000-620. I can read in this double, but the format is not the
> same as expected by the x86 system. Does anyone have any source available
> to convert the double in C? Even a format (or formula) for how VAX stores
> doubles would be appreciated. Thanks in advance.
If you want the bit patterns for the various floating point formats, here
is one place they are documented:
Actually, this isn't the best manual; these figures don't explain the bias
in the exponent, what happens to the leading "1" bit in the mantissa,
etc. I prefer the stuff that appears in the language reference manuals --
Fortran, for instance. You might want to hunt around the compaq web site
for the Fortran home page; I think the manuals are still on-line there.
Note that VAXen support 2 different double precision formats, D and G.
There are VMS library routines to do such conversions, and many of the
language compilers support conversions in the language these days. But
these are not relevent if you have to do the conversion on a non-VMS