Path: utzoo!mnetor!uunet!steinmetz!davidsen From: davidsen@steinmetz.steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 Message-ID: <10283@steinmetz.steinmetz.ge.com> Date: 6 Apr 88 14:12:32 GMT References: <2550049@hpisod2.HP.COM> <7412@brl-smoke.ARPA> <3351@chinet.UUCP> <10229@steinmetz.steinmetz.ge.com> <7792@alice.UUCP> Reply-To: davidsen@kbsvax.steinmetz.UUCP (William E. Davidsen Jr) Organization: General Electric CRD, Schenectady, NY Lines: 36 In article <7792@alice.UUCP> ark@alice.UUCP writes: }In article <10229@steinmetz.steinmetz.ge.com>, davidsen@steinmetz.UUCP writes: } }> People (usually ;>) have no problem with the idea the while assigning a }> zero to a float gives it the vaule 0.0, in most implementations the ^^^^ Foot in mouth time... I think "some" would be more correct. }> float value does not have all bits set to zero. } }I am overwhelmed by curiosity. Can you give me examples of }three machine architectures in which the floating-point value }0 does not have all its bits set to zero? No. I can tell you two series of systems which have non-zero 0.0 (Honeywell 6000 and DPS), two which I'm told have non-zero 0.0 (mid 70's IBM minis and Data General). My reasoning is as follows: given: there are machines which do have C and don't have flat 0 expressed as all bits zero, and the proposed C standard doesn't say that any machine running C must have float 0 be all bits zero, and I have no reason to think that innovation and standards have stopped evolving, therefore: I conclude that assuming float 0 to be all bits zero, or any other machine independent integer value, is non-portable, now and in the future. In light of the previous discussion, I was discussing "really portable" as opposed to "portable to many machines." -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me