From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,353213c6ba11774a,start X-Google-Attributes: gid1164f8,public From: james@engrs.unl.edu (James Nau) Subject: DEC Unix 4.0 IEEE floating point on Alpha Date: 1997/07/23 Message-ID: <5r5qt6$gd8@crcnis3.unl.edu>#1/1 X-Deja-AN: 258408135 Organization: College of Engineering & Technology, University of Nebraska-Lincoln Keywords: ieee binary floating point alpha Newsgroups: comp.sys.dec 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