Float:16

COTTRELL, JAMES cottrell at nbs-vms.ARPA
Thu Oct 3 05:01:29 AEST 1985


> > > Then you can define
> > > 
> > > float foo:16;
> > > 
> > > if you really think you can do something useful with 16-bit floats. Someone
> > > must use them for something...
> > 
> > Just such a construct is used in the accounting software in many UNIX System
> > kernels.  It seems to suffice for the application.
> 
> Great, a violation of the C language spec in the kernel.

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.

	jim		cottrell at nbs
*/
------



More information about the Comp.lang.c mailing list