Path: utzoo!mnetor!uunet!husc6!bbn!rochester!rutgers!jvnca!hook From: hook@jvnca.csc.org (Ed Hook) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 Message-ID: <224@jvnca.csc.org> Date: 7 Apr 88 16:53:30 GMT References: <2550049@hpisod2.HP.COM> <7412@brl-smoke.ARPA> <3351@chinet.UUCP> <10229@steinmetz.steinmetz.ge.com> <1323@PT.CS.CMU.EDU> Reply-To: hook@jvnca.csc.org.UUCP (Ed Hook) Organization: John Von Neumann Center, Princeton, N.J. Lines: 37 In article <1323@PT.CS.CMU.EDU> edw@IUS1.CS.CMU.EDU (Eddie Wyatt) writes: >Aside: > >> 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 >> float value does not have all bits set to zero. > > I do believe IEEE and Vax's version of float is a bit pattern >consisting of all zeros. So what are these implementations that don't >use zero bit pattern? > There's at least one architecture with this characteristic. The Control Data Cyber 205 ( and its successor, the ETA^10 ) employ a 64-bit floating point representation in which zero appears as 8000 0000 0000 0000 ; in fact, any word whose most significant nybble is an '8' is = 0.0 in this system - the example above is the flavor of 0.0 which is produced by any computation whose result is zero ( and, thus, is the most familiar example of 0.0 ). I can't seem to find my copy of the IEEE Floating Point Standard & so can't cite chapter & verse, BUT I don't believe that it requires a valid floating point 0.0 to be represented by a bit pattern having all bits = 0. I say this because it didn't appear to me that the 205's representation of floating point quantities was in violation of the standard on this score, when I went through the document recently. If I'm wrong in holding this opinion, I would appreciate being set straight ... Ed Hook Control Data Corporation John von Neumann National Supercomputer Center Princeton, NJ "If I said it, it's MY opinion ... at least for now ..."