IEEE<->DEC floating pt conversion wanted.
Alan's Home for Wayward Notes File.
alan at shodha.dec.com
Fri Aug 25 02:35:33 AEST 1989
In article <3741 at ncsuvx.ncsu.edu>, brg at ecelet.ncsu.edu (Bennett Groshong) writes:
> I have a need to be able to convert data files containing floating
> point numbers (i.e. 32bit floats and 64bit doubles) between IEEE and
> DEC floating point format. *SOMEONE* has to have written this, yet
> neither I nor any of the wizards here can find such a routine.
> (I've searched the obvious newsgroups and the Ultrix doc.)
If you have a DECstation or DECsystem there are a
set of functions in the standard library for doing
this conversion. There isn't any documentation that
I know of though.
Some of the functions of interest are:
dtoi - D Float to IEEE
ftoi - F Float to IEEE
itod - IEEE to D Float
itof - IEEE to F Float
There may also be a set for the G-Float format. From little
I've been able to divine they take a point pointer to the
number and convert it in place. If it fails it restores
the original number and returns -1.
>
> If this is in one of the std libraries/doc, consider me red-faced.
>
They're in the library, but without documentation or even
a man page are hard to track down.
I don't know whether or not these functions are supported.
Check with the CSC if you have a support contract to see
what they can find out.
--
Alan Rollow alan%nabeth.dec.com at decwrl.dec.com
More information about the Comp.unix.questions
mailing list