This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: real.c on unicosmk



> > ..  The PDP-11 floating point format is similar to a VAX but
> > I think the byte order is slightly scrambled relative to VAX format.
>
> I'd have to check the memory order question.


Here is a list of bit patterns for various computers, as they would
have been written for the contemporaneous software of the day.

  http://www.netlib.org/port/Mach/

If you expressed a floating point value as a big-endian array of
16-bit integers, both a PDP-11 and a VAX would interpret the same
floating point value.  If you used 32-bit integers, however, they
didn't look the same.  The reason for that was the high-order 16 bits
would come first in memory on a PDP-11 but last on a VAX.
The PDP-11 definition was an arbitrary software specification, since
there were no actual hardware 32-bit operations.

Here is an example of the bit-scrambling from the above list, the pattern
for single precision log of 10.

PDP-11,  O07746420233 (= 0x3f9a209b)
         = DATA LOG10(1),LOG10(2) / O037632, O020233
VAX,  Z209B3F9A


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]