From: Paul DeMone <PaulDeMone@EasyInternet.net>
Subject: Re: DEC Unix 4.0 IEEE floating point on Alpha
Date: 1997/07/23 [thread overview]
Message-ID: <33D6C4C2.63B7@EasyInternet.net> (raw)
In-Reply-To: 5r5qt6$gd8@crcnis3.unl.edu
James Nau wrote:
>
> Hi all,
>
> I've come across a problem with the floating point format on
> DEC alphas. It happens under both VMS and Digital Unix. It
> appears to me that Alphas store IEEE floating point numbers
> backwards. On an Alpha, for value 511.0, I get:
>
> 00 80 FF 43
>
> as the binary representation [written by
> fwrite( &x, sizeof(float), 1, outfile);]
>
> while on every other Unix workstation I've been able to get my fingers
> on yields:
>
> 43 FF 80 00
>
> which all the tools and info I find say this is 511.0 in IEEE format.[snip]
It looks like a byte endianess problem to me. The Alpha runs in little
endian mode (like VAX and x86) while 68K, SPARC, and non-DEC MIPS based
workstations run in big endian mode.
You could write FP values to a file in big endian order on your Alpha
if you alias a char array over the FP value in memory and pick up the
bytes in reverse order and write them individually to your file There
are probably more elegent ways of doing this...
> james
>
> james@engrs.unl.edu
--
Paul W. DeMone The 801 experiment SPARCed an ARMs race
Kanata, Ontario to put more PRECISION and POWER into
demone@mosaid.com architectures with MIPSed results but
PaulDeMone@EasyInternet.net ALPHA's well that ends well.
next prev parent reply other threads:[~1997-07-23 4:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-23 4:00 DEC Unix 4.0 IEEE floating point on Alpha James Nau
1997-07-23 4:00 ` Paul DeMone [this message]
1997-07-24 4:00 ` Emmanuel Choquet
1997-07-24 4:00 ` Jim Griffin
1997-07-26 4:00 ` John Hascall
1997-08-05 4:00 ` Eugene Y C Chu
1997-07-24 4:00 ` A.Arnold
1997-07-24 4:00 ` fairfield
1997-07-25 4:00 ` Steve Lionel
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