More Naughty Bits

Michael Meissner meissner at rtp47.UUCP
Sun Aug 11 06:04:26 AEST 1985


In article <575 at brl-tgr.ARPA> Cottrell at BRL.ARPA, James writes:
>/*
>me		->> What other kind of zero is there?
>Doug Gwyn	->  How about 0.0?
>
>How about it? Any pattern of all zeros is considered zero by any
>*sane* floating point unit. You are perfectly welcome to use insane
>FPU's, but then you'd have to write an insane C compiler, wouldn't you?
>What's that you say? They're *all* insane? Got to keep the loonies on the path!

While I agree with the comment about *sane* floating point, a similar topic was
raised in the the ANSI C meetings when discussing the implied initialization
of static/extern variables to 0.  To my surprise, there is at least one machine
out there where 0.0 does not have all bits set to zero!  Also, there was some
discussion that a NULL pointer might not have all bits zero either, just as
long as a zero integer can be converted to the bit pattern used, and vica versa.
The reason given was for ring/segment machines, you might want to put in
the current segment, or an unused segment.

BTW, I believe the machine with the unusual floating point might have been a
univac 1100, but I could be mistaken.

	Michael Meissner
	Data General
	...{ ihnp4, allegra, decvax }!mcnc!rti-sel!rtp47!meissner



More information about the Comp.lang.c mailing list