Float to sign/exp/mantissa
Guy Harris
guy at auspex.auspex.com
Sun Apr 9 09:16:09 AEST 1989
> What I am doing is writing a Machine Independant Format (MIF) similar to
> XDR that Sun has. This arose out of the fact that some of the machines
> that we need to use do not have XDR support.. So I am writing my own.
You may want to grab Sun's XDR source from, say, "uunet", instead; it's
in the "comp.sources.unix" archives. It may not have support for your
floating-point format, but at least it's a start.
Basically, the XDR form is big-endian IEEE. The code is
machine-dependent; the VAX version represents the VAX format as a
structure with bit fields, and extracts and inserts the fields that way.
More information about the Comp.unix.wizards
mailing list