Routine to convert between IEEE and VAX floating point ?

Wally Kramer wallyk at tekfdi.FDI.TEK.COM
Tue Jun 5 06:18:16 AEST 1990


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 at tekfdi.fdi.tek.com (Wally Kramer) 503 627 2363
Contractor from Step Technology, Inc.  503 244 1239



More information about the Comp.unix.ultrix mailing list