From: james@engrs.unl.edu (James Nau)
Subject: DEC Unix 4.0 IEEE floating point on Alpha
Date: 1997/07/23 [thread overview]
Message-ID: <5r5qt6$gd8@crcnis3.unl.edu> (raw)
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.
Can someone tell me if it's possible to get the Alpha to read/write
IEEE in the right order? I've tried cc with the -ieee switch, but
that didn't do anything useful, and I tried gcc, and under VMS, I
tried cc/float=ieee ..., all of which yielded the 'backwards' IEEE format.
[my immediate need is for reading IEEE binary format generated
elsewhere, into a canned program, without wanting to write a byte
re-ordering program...]
Thanks for any help
james
james@engrs.unl.edu
next 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 James Nau [this message]
1997-07-23 4:00 ` DEC Unix 4.0 IEEE floating point on Alpha Paul DeMone
1997-07-24 4:00 ` Emmanuel Choquet
1997-07-24 4:00 ` A.Arnold
1997-07-24 4:00 ` fairfield
1997-07-25 4:00 ` Steve Lionel
1997-07-24 4:00 ` Jim Griffin
1997-07-26 4:00 ` John Hascall
1997-08-05 4:00 ` Eugene Y C Chu
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