Subject: Floating point .....
To: None <port-arm32@netbsd.org>
From: Phil Nelson <phil@cs.wwu.edu>
List: port-arm32
Date: 10/27/1998 09:48:35
Hi, 

  I've been trying to run pvm and I have traced down the problems to the
floating point format.  I have found that 1 as a float is stored as:

 0x3f800000   (in memory byte order ...  0x00, 0x00, 0x80, 0x3f which is little endian)

which is single precision IEEE format.  This is fine.  The problem is
that doubles appear be stored in a format other than IEEE double precision.
Here is what I find.  The number 1 as a double should be:

0x3ff0000000000000 

Little Endian byte order should be 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f
but I find that when accessed as  "char *p = (char *)&double_var;" p[0], p[1], ... p[7]
gives the following order:

0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00

Which makes it look like the words are stored in BE and the bytes in each word
is stored LE.  

Given this, pvm thinks it can't figure out what floating point byte order
is used and gives up!

Can anyone verify that this is the case.  And if so, is it something that
should be "fixed" so it looks like IEEE double precision?

Thanks.

-- 
Phil Nelson                    NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu        !gifs: http://www.gnu.org/philosophy/gif.html
http://www.cs.wwu.edu/~phil