Float:16

Henry Spencer henry at utzoo.UUCP
Sat Oct 5 04:50:28 AEST 1985


> > Great, a violation of the C language spec in the kernel. [16-bit float]
> 
> Not really. I haven't axually seen it, but here's my theory:
> There must be a union of short[2] & float somewhere in the (which?) 
> kernel. The magic numbers are computed in float and the short[0] is
> written out to a file, the lower mantissa bits being deemed worthless.
> Not a violation, just (nonportable) bit fiddling.

Nope, wrong.  The format is 3 bits of exponent and 13 bits of mantissa,
which does not correspond to *any* hardware format.  It is hand-cooked
using bit-manipulation operations, fairly portably.  No violation of
standards is involved; it's simply a compressed data format unique to
this particular application.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list