Xref: utzoo comp.lang.c:29335 comp.unix.ultrix:3667 comp.sys.ibm.pc:51861 comp.sources.wanted:11977 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!ogicse!zephyr.ens.tek.com!tekfdi!wallyk From: wallyk@tekfdi.FDI.TEK.COM (Wally Kramer) Newsgroups: comp.lang.c,comp.unix.ultrix,comp.sys.ibm.pc,comp.sources.wanted Subject: Re: Routine to convert between IEEE and VAX floating point ? Message-ID: <4392@tekfdi.FDI.TEK.COM> Date: 4 Jun 90 20:18:16 GMT References: <1023@rna.UUCP> <1990Jun3.084602.1662@noao.edu> Reply-To: wallyk@tekfdi.fdi.tek.com (Wally Kramer) Followup-To: comp.sources.wanted Organization: Microwave & RF Instruments, Tektronix, Beaverton, Oregon Lines: 22 This seems to be a subject which crops up from time to time. I have four routines which perform the following conversions: DEC F_FLOAT to/from IEEE ShortReal DEC D_FLOAT to/from IEEE LongReal They are tested using the VAXC C compiler (from DEC), Turbo C 2.0, and Green Hills C compiler for the 386. As written, they do not appear to work on Sun compilers for the 68000, but should be easy to modify for this purpose. They are written in ANSI C without the use of floating point instructions (that is, no float or double declarations--just structure manipulations). There is sufficient documentation to write the remaining conversions, or to learn just about anything you want about either DEC or IEEE formats. I'll be happy to email a copy to anyone who asks. (I prefer Email requests. Use the phone only if your mailer can't reach me.) wallyk@tekfdi.fdi.tek.com (Wally Kramer) 503 627 2363 Contractor from Step Technology, Inc. 503 244 1239