Message-ID: <3B8433C8.16AD@indyx.net> From: freddy1X Reply-To: freddy1X Organization: IndyNet X-Mailer: Mozilla 3.04C-IndyNet (Win16; I) MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 Date: Wed, 22 Aug 2001 18:35:52 -0400 NNTP-Posting-Host: 209.183.70.81 X-Complaints-To: abuse@onemain.com X-Trace: nntp2.onemain.com 998523457 209.183.70.81 (Wed, 22 Aug 2001 19:37:37 EDT) NNTP-Posting-Date: Wed, 22 Aug 2001 19:37:37 EDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fr.clara.net!heighliner.fr.clara.net!feed2.onemain.com!feed1.onemain.com!nntp2.onemain.com.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88184 Edward Rice wrote: > > IF (arithmetic result) s1, s2, s3 > > which would go to s1 if the result was less than zero (distinct from > negative, because we had a machine that distinguished negative zero from > positive zero -- not all second-generation hardware could do that), s2 if > it was positive or negative zero, and s3 if it was greater than zero. > NEGATIVE??? Why, everybody knows that zero is an even number. And don't get me started on what is considered an "odd" number. But seriously, how does a machine develope the concept of a negative Zero and how is it properly used? Is it some perverted use of the negative status flag? I do recall a description of the 8087 coprocessor handling of devide-by-zero errors: something about representing negative and positive infinity. But I still wonder if there is a practical use for such arithmetic tomfoolery. -- keep away from heat or open flame /\>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\/ /\ I may be demented \/ /\ but I'm not crazy! \/ /\<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\/ * SPAyM trap: there is no X in my address * || attatch FLAME here || \/ \/ X ###### From: jmfbahciv@aol.com Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: Thu, 23 Aug 01 08:54:33 GMT Organization: UltraNet Communications, Inc. Lines: 24 Message-ID: <9m2q30$gbf$4@bob.news.rcn.net> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> X-Trace: UmFuZG9tSVaAN1rUL/0U18bNa1LIliwgHePpKxbBJ2gQ4336Cdn2geymVyTishe1 X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 23 Aug 2001 11:40:16 GMT X-Newsreader: News Xpress Version 1.0 Beta #4 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!207-172-216-164 Xref: chonsp.franklin.ch alt.folklore.computers:88105 In article <1bn14rwkx6.fsf@cs.nmsu.edu>, Joe Pfeiffer wrote: >> In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: >> >> >But seriously, how does a machine develope the concept of a negative >> >Zero and how is it properly used? Is it some perverted use of the >> >negative status flag? > >No, it's just what happens when you use either sign-magnitude or one's >complement representation. The only good use I ever heard of for it >was as an uninitialized-variable marker. This sounds like an aspect that somebody tripped over, thought was a neat hack, and proceded to base the whole implementation on it. As somebody who has to relearn how two's-complement works every time, would you elaborate just a tad on the term "uninitialized variable term"? /BAH Subtract a hundred and four for e-mail. ###### From: rsteiner@isis.visi.com (Richard C. Steiner) Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> Organization: Vector Internet Services, Inc. Message-ID: User-Agent: slrn/0.9.5.4 (UNIX) Lines: 18 Date: Thu, 23 Aug 2001 00:16:05 GMT NNTP-Posting-Host: 209.98.98.8 X-Complaints-To: abuse@visi.com X-Trace: ruti.visi.com 998525765 209.98.98.8 (Wed, 22 Aug 2001 19:16:05 CDT) NNTP-Posting-Date: Wed, 22 Aug 2001 19:16:05 CDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-mue1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!ruti.visi.com!rsteiner Xref: chonsp.franklin.ch alt.folklore.computers:88169 In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: >But seriously, how does a machine develope the concept of a negative >Zero and how is it properly used? Is it some perverted use of the >negative status flag? Here's one interesting in-depth discussion of Negative Zero on UNIVAC 1100-series hardware: http://www.fourmilab.ch/documents/univac/minuszero.html It's an interesting side-effect of doing ones complement arithmetic. -- -Rich Steiner >>>---> rsteiner@visi.com >>>---> Eden Prairie, MN Written online using slrn 0.9.5.4! The Theorem Theorem: If If, Then Then. ###### From: Joe Pfeiffer Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 22 Aug 2001 20:48:53 -0600 Organization: NMSU Computer Science Lines: 14 Message-ID: <1bn14rwkx6.fsf@cs.nmsu.edu> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> NNTP-Posting-Host: viper.cs.nmsu.edu X-Trace: bubba.NMSU.Edu 998534929 17481 128.123.64.113 (23 Aug 2001 02:48:49 GMT) X-Complaints-To: usenet@bubba.NMSU.Edu NNTP-Posting-Date: 23 Aug 2001 02:48:49 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!newsfeed2.skycache.com!Cidera!dca6-feed2.news.digex.net!lax2-feed1.news.digex.net!intermedia!lynx.unm.edu!news.NMSU.Edu!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88099 > In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: > > >But seriously, how does a machine develope the concept of a negative > >Zero and how is it properly used? Is it some perverted use of the > >negative status flag? No, it's just what happens when you use either sign-magnitude or one's complement representation. The only good use I ever heard of for it was as an uninitialized-variable marker. -- Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605 Department of Computer Science FAX -- (505) 646-1002 New Mexico State University http://www.cs.nmsu.edu/~pfeiffer SWNMRSEF: http://www.nmsu.edu/~scifair ###### From: Joe Pfeiffer Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 23 Aug 2001 08:29:15 -0600 Organization: NMSU Computer Science Lines: 30 Message-ID: <1bg0ai26kk.fsf@cs.nmsu.edu> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> <9m2q30$gbf$4@bob.news.rcn.net> NNTP-Posting-Host: viper.cs.nmsu.edu X-Trace: bubba.NMSU.Edu 998576952 28688 128.123.64.113 (23 Aug 2001 14:29:12 GMT) X-Complaints-To: usenet@bubba.NMSU.Edu NNTP-Posting-Date: 23 Aug 2001 14:29:12 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!upp1.onvoy!msc1.onvoy!onvoy.com!hardy.tc.umn.edu!lynx.unm.edu!news.NMSU.Edu!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88089 jmfbahciv@aol.com writes: > > This sounds like an aspect that somebody tripped > over, thought was a neat hack, and proceded to base the whole > implementation on it. That wouldn't surprise me a bit. > As somebody who has to relearn how two's-complement works every > time, would you elaborate just a tad on the term "uninitialized > variable term"? Programming bug -- using a variable before initializing it. The CDC 6600 (the only 1's complement machine I have any familiarity with) had its arithmetic rigged so that any sequence of arithmetic operations that produced 0 was guaranteed to produce +0, so the only way to get a -0 was to put it there deliberately. Then you could set the loader to initialize everything to -0; if you hit one it meant you'd hit an uninitialized variable. My wife once worked for Boeing Computer Services on a contract from NASA. They didn't realize that their loader was set to initialize to 0, and the site they were delivering to had it set to -0. It took them quite a while to figure out why the working code they sent blew up so spectacularly... -- Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605 Department of Computer Science FAX -- (505) 646-1002 New Mexico State University http://www.cs.nmsu.edu/~pfeiffer SWNMRSEF: http://www.nmsu.edu/~scifair ###### From: jmfbahciv@aol.com Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: Fri, 24 Aug 01 09:37:53 GMT Organization: UltraNet Communications, Inc. Lines: 39 Message-ID: <9m5h0h$h66$8@bob.news.rcn.net> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <3B84671C.80961215@yahoo.com> <3B85922B.D61D9229@thinkage.ca> <3B85B1AA.38645548@yahoo.com> X-Trace: UmFuZG9tSVZ7k6gqppzUMIXftO6JAfdOyGaUv+u1EFM/yN5+tFQT6A5LCDKDdAT2 X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 24 Aug 2001 12:23:45 GMT X-Newsreader: News Xpress Version 1.0 Beta #4 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!209-122-236-93 Xref: chonsp.franklin.ch alt.folklore.computers:88226 In article <3B85B1AA.38645548@yahoo.com>, CBFalconer wrote: >"Alan T. Bowler" wrote: >> >> CBFalconer wrote: >> >> > With sign-magnitude, or 1's complement. Even 2's complement >> > machines normally use sign magnitude for floating point >> > significand representation. >> >> No. Sign magnitude, while common for floating point, >> certainly does not qualify for "normally used". Lots of >> machines used complement notations. One of the neater >> tricks, was to use a leading excess notation for the exponent >> (like IBM and IEEE), and then represent negative numbers >> by taking the two's complement of the whole bit image. >> This allows you to use the same compare instruction >> for fixed and floating point. This trick was used on >> the SDS (later XDS) Sigma series. >> >> It seems to be the one trick that the IEEE format didn't >> pick up. > >Interesting. However, I don't think compare is used anywhere near >as often as the basic arithmetic operations, so I fail to see the >usefulness. I may be missing something. You are. PDP-10s breathed compares. One of the tricks of the trade was to do compare-set bit combinations rather than use the arithmetic instructions. It was much faster and there was some kind of macho fever comparing the largest number of consecutive compare instructions. /BAH /BAH Subtract a hundred and four for e-mail. ###### From: jmfbahciv@aol.com Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: Fri, 24 Aug 01 09:44:50 GMT Organization: UltraNet Communications, Inc. Lines: 57 Message-ID: <9m5hdh$h66$9@bob.news.rcn.net> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <9m4chk$fj0$1@panix3.panix.com> X-Trace: UmFuZG9tSVZ44RhNE82mxq27bEj//K2roUAPlOJvVfnIG/aa02TCyUutO08TsN7g X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 24 Aug 2001 12:30:41 GMT X-Newsreader: News Xpress Version 1.0 Beta #4 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!209-122-236-93 Xref: chonsp.franklin.ch alt.folklore.computers:88239 In article <9m4chk$fj0$1@panix3.panix.com>, librik@panix.com (David Librik) wrote: >freddy1X writes: >>But seriously, how does a machine develope the concept of a negative >>Zero and how is it properly used? > >You get a negative zero if your machine uses signed-magnitude or >ones-complement representation of negative numbers, rather than >the more common two's complement. > >Negative zero is quite useful in scientific computing. Notice >that any "number" represented on a computer actually corresponds >to an interval in the real number continuum. So if 3.1415 is a >machine number at full precision, it is treated (in numerical >analysis, the study of numerical error in algorithmic computation) >as "any real number from 3.1415 all the way up to (but not including) >3.1416." The interval that 3.1415 corresponds to has a width of >..0001. > >In general, all machine numbers have intervals of the same size. >For integers, this size is 1: an integer 3 corresponds to an >interval [3, 4). This uniformity of size makes numerical error >predictable and controllable in algorithms. > >But there is an exception -- unsigned 0 has an interval twice as >wide as the interval for any other number. For integers, 0 >corresponds to the range (-1, 1). > >Thus results are potentially twice as inaccurate, and error bounds >analysis much less uniform, when you near 0. > >Now you can see what -0 and +0 are good for. Suppose, on a system >with integers as the highest precision, you get an answer of 7. >You know the actual result was between 7 and 8. Similarly, if >you get an answer of -0, you know the actual result lies between >-1 and 0; if you get +0, you know it's between 0 and +1. If all >you have is unsigned 0, it could be anywhere from -1 to 1 -- twice >as uncertain. I've never heard it explained in this way. > >Hope this helps. Excuse me but I want to double check this explanation :-). Is this correct? Number representations always did drive me nuts. How does this length on the number line concept tie into the electrical wiring? For instance, I thought a bit shift was a shorthand form of multiplying or dividing. So doing a bit shift over zero needs a hop over. /BAH Subtract a hundred and four for e-mail. ###### From: "Charlie Gibbs" Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 23 Aug 01 12:04:03 -0800 Organization: http://extra.newsguy.com Lines: 74 Message-ID: <3849.635T180T7243029@nowhere.in.particular> References: <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> <9m2q30$gbf$4@bob.news.rcn.net> <1bg0ai26kk.fsf@cs.nmsu.edu> NNTP-Posting-Host: p-587.newsdawg.com X-Newsreader: THOR 2.5a (Amiga;TCP/IP) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-hog.berkeley.edu!newsfeed.berkeley.edu!ucberkeley!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!news1 Xref: chonsp.franklin.ch alt.folklore.computers:88344 In article <1bg0ai26kk.fsf@cs.nmsu.edu> pfeiffer@cs.nmsu.edu (Joe Pfeiffer) writes: >jmfbahciv@aol.com writes: > >> As somebody who has to relearn how two's-complement works every >> time, would you elaborate just a tad on the term "uninitialized >> variable term"? > >Programming bug -- using a variable before initializing it. The CDC >6600 (the only 1's complement machine I have any familiarity with) had >its arithmetic rigged so that any sequence of arithmetic operations >that produced 0 was guaranteed to produce +0, so the only way to get a >-0 was to put it there deliberately. Then you could set the loader to >initialize everything to -0; if you hit one it meant you'd hit an >uninitialized variable. You could do this with the IBM 360 and its progeny if you were using packed decimal fields. Also, it accepted hex F as a valid positive sign, to make it easier if you packed an EBCDIC numeric digit; it would convert a sign of F to C at the earliest opportunity. Early Univac machines like the 9300 and 9400 were even less discriminating; they did no digit or sign checking at all, which led to some interesting crashes during conversions to newer machines. We sometimes discovered invalid data which had lain undetected in files for several years. In one zoned decimal field, the keypunch operator's finger had strayed to the left of the 1 and hit the vertical bar which lay there (a design flaw of the 029 keyboard). The 9300 didn't care - it happily packed and processed the field, giving an undefined but consistent result. After converting the program to the 90/30, it blew up on that record. We looked up the original data on microfiche. Sure enough, there was the vertical bar - proudly sitting there and looking enough like a 1 that nobody had ever spotted the error. I wound up writing a program which would verify every field in every record of the large data file - it produced an interesting report. This lax processing of packed decimal fields led to some rather nasty practices by lazy programmers. One payroll program had a large array of packed decimal accumulators. The original programmer initialized this array by propagating a binary zero through the entire array with a single overlapping MVC instruction, rather than Doing The Right Thing, i.e. coding a loop that ZAPped a valid zero into each field. The 9400 on which the program originally ran didn't care - the first time something was added to such a variable the sign would be corrected. When we moved the program to a 90/30, it blew up spectacularly. The programmer doing the port had decided on a quick-and-dirty fix - he got his hands on a routine which would trap the data exception, clean up the invalid field, and resume execution. On the first test the program ran, but excruciatingly slowly. It took many times as long to run as it did on the old machine, and was consuming 100% CPU all the while. The job log showed that in processing a 1000-record file, this little patch routine caught 1 1/2 _million_ data exceptions. I got my hands on the program and ripped out all the quick-and-dirty code (along with the clean-up patch). It wasn't that difficult to recode it correctly, and the resulting program ran like a bat out of hell. >My wife once worked for Boeing Computer Services on a contract from >NASA. They didn't realize that their loader was set to initialize to >0, and the site they were delivering to had it set to -0. It took >them quite a while to figure out why the working code they sent blew >up so spectacularly... It's things like this that taught me very early that counting on memory being cleared to any particularly value is Evil. To this day I never use any variable which I haven't explicitly initialized myself. -- cgibbs@nowhere.in.particular (Charlie Gibbs) I'm switching ISPs - watch this space. ###### From: gah@ugcs.caltech.edu (glen herrmannsfeldt) Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 23 Aug 2001 19:08:50 GMT Organization: California Institute of Technology, Pasadena Lines: 38 Message-ID: <9m3kc2$33i@gap.cco.caltech.edu> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> <9m2q30$gbf$4@bob.news.rcn.net> NNTP-Posting-Host: hork.ugcs.caltech.edu X-Newsreader: NN version 6.5.0 #1 (NOV) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!yellow.newsread.com!netaxs.com!newsread.com!news.uchicago.edu!nntp-server.caltech.edu!gah Xref: chonsp.franklin.ch alt.folklore.computers:88267 jmfbahciv@aol.com writes: >In article <1bn14rwkx6.fsf@cs.nmsu.edu>, > Joe Pfeiffer wrote: >>> In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: >>> >>> >But seriously, how does a machine develope the concept of a negative >>> >Zero and how is it properly used? Is it some perverted use of the >>> >negative status flag? >> >>No, it's just what happens when you use either sign-magnitude or one's >>complement representation. The only good use I ever heard of for it >>was as an uninitialized-variable marker. > This sounds like an aspect that somebody tripped >over, thought was a neat hack, and proceded to base the whole >implementation on it. >As somebody who has to relearn how two's-complement works every >time, would you elaborate just a tad on the term "uninitialized >variable term"? Many early binary machines were either sign-magnitude or ones-complement. Most current floating point representations are sign-magnitude and do have a negative zero. x=0; x=-x; will generate negative zero in most such implementations. I believe that the suggestion is to initialize variables to a value that is never generated, and then test for that value. I believe, though, that sign-magnitude and ones-complement machines often generate negative zero. The best number I know of to initialize variables to is repeated X'81' bytes. The is a relatively rarely used value in both 32 bit integer and many floating point representations, and is easy to recognize it a hex dump. -- glen ###### Message-ID: <3B855F37.9DDC3B2B@yahoo.com> From: CBFalconer Reply-To: cbfalconer@worldnet.att.net Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> <9m2q30$gbf$4@bob.news.rcn.net> <1bg0ai26kk.fsf@cs.nmsu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 34 Date: Thu, 23 Aug 2001 20:54:36 GMT NNTP-Posting-Host: 12.90.176.32 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 998600076 12.90.176.32 (Thu, 23 Aug 2001 20:54:36 GMT) NNTP-Posting-Date: Thu, 23 Aug 2001 20:54:36 GMT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88198 Joe Pfeiffer wrote: > > jmfbahciv@aol.com writes: > > > > This sounds like an aspect that somebody tripped > > over, thought was a neat hack, and proceded to base the whole > > implementation on it. > > That wouldn't surprise me a bit. > > > As somebody who has to relearn how two's-complement works every > > time, would you elaborate just a tad on the term "uninitialized > > variable term"? > > Programming bug -- using a variable before initializing it. The CDC > 6600 (the only 1's complement machine I have any familiarity with) had > its arithmetic rigged so that any sequence of arithmetic operations > that produced 0 was guaranteed to produce +0, so the only way to get a > -0 was to put it there deliberately. Then you could set the loader to > initialize everything to -0; if you hit one it meant you'd hit an > uninitialized variable. Seems the CDC designers missed a bet - doing arithmetic with a subtractor (1's complement) +0 will never arise. So initialization to all bits zero would mark uninitialized memory. That should translate into an easy default uninitialized condition. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest) ###### Message-ID: <3B85922B.D61D9229@thinkage.ca> From: "Alan T. Bowler" Organization: Thinkage Ltd. X-Mailer: Mozilla 4.5 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <3B84671C.80961215@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 18 Date: Thu, 23 Aug 2001 19:30:51 -0400 NNTP-Posting-Host: 192.102.11.4 X-Trace: nnrp1.uunet.ca 998609449 192.102.11.4 (Thu, 23 Aug 2001 19:30:49 EDT) NNTP-Posting-Date: Thu, 23 Aug 2001 19:30:49 EDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!sunqbc.risq.qc.ca!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88201 CBFalconer wrote: > With sign-magnitude, or 1's complement. Even 2's complement > machines normally use sign magnitude for floating point > significand representation. No. Sign magnitude, while common for floating point, certainly does not qualify for "normally used". Lots of machines used complement notations. One of the neater tricks, was to use a leading excess notation for the exponent (like IBM and IEEE), and then represent negative numbers by taking the two's complement of the whole bit image. This allows you to use the same compare instruction for fixed and floating point. This trick was used on the SDS (later XDS) Sigma series. It seems to be the one trick that the IEEE format didn't pick up. ###### From: Jim Thomas Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 23 Aug 2001 14:17:25 -1000 Organization: Canada France Hawai`i Telescope Lines: 25 Message-ID: References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <1bn14rwkx6.fsf@cs.nmsu.edu> NNTP-Posting-Host: atlas.cfht.hawaii.edu X-Trace: news.hawaii.edu 998612245 9652 128.171.80.135 (24 Aug 2001 00:17:25 GMT) X-Complaints-To: usenet@hawaii.edu NNTP-Posting-Date: 24 Aug 2001 00:17:25 GMT X-Newsreader: Gnus v5.7/Emacs 20.6 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-mue1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!hammer.uoregon.edu!news.hawaii.edu!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88355 >>>>> "Joe" == Joe Pfeiffer writes: >> In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: >> >> >But seriously, how does a machine develope the concept of a negative >> >Zero and how is it properly used? Is it some perverted use of the >> >negative status flag? Joe> No, it's just what happens when you use either sign-magnitude or one's Joe> complement representation. The only good use I ever heard of for it Joe> was as an uninitialized-variable marker. On the 1620, blanks were 00 (no characters, they were stored as 2 digits each). On the Model 1 the compare instruction did a full subtraction before checking the result. On the Model 2 the compare instruction stopped as soon as the values were different if the signs were different. (It was a field machine - numbers were stored in multiple storage locations addressed in what is now called little-endian, with a flag bit used as a minus sign on the low order digit and end of field on the high order digit.) So comparing for blanks went faster if the blank was minus, i.e., a negative zero :-) I don't remember any good uses on the 14xx systems. Jim ###### From: librik@panix.com (David Librik) Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 23 Aug 2001 22:01:24 -0400 Organization: Icy Waters Underground, Inc. Lines: 40 Message-ID: <9m4chk$fj0$1@panix3.panix.com> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> NNTP-Posting-Host: panix3.panix.com X-Trace: news.panix.com 998618482 26561 166.84.1.3 (24 Aug 2001 02:01:22 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: 24 Aug 2001 02:01:22 GMT X-Newsreader: NN version 6.5.6 (NOV) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!skynet.be!skynet.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!panix!news.panix.com!panix3.panix.com!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88252 freddy1X writes: >But seriously, how does a machine develope the concept of a negative >Zero and how is it properly used? You get a negative zero if your machine uses signed-magnitude or ones-complement representation of negative numbers, rather than the more common two's complement. Negative zero is quite useful in scientific computing. Notice that any "number" represented on a computer actually corresponds to an interval in the real number continuum. So if 3.1415 is a machine number at full precision, it is treated (in numerical analysis, the study of numerical error in algorithmic computation) as "any real number from 3.1415 all the way up to (but not including) 3.1416." The interval that 3.1415 corresponds to has a width of .0001. In general, all machine numbers have intervals of the same size. For integers, this size is 1: an integer 3 corresponds to an interval [3, 4). This uniformity of size makes numerical error predictable and controllable in algorithms. But there is an exception -- unsigned 0 has an interval twice as wide as the interval for any other number. For integers, 0 corresponds to the range (-1, 1). Thus results are potentially twice as inaccurate, and error bounds analysis much less uniform, when you near 0. Now you can see what -0 and +0 are good for. Suppose, on a system with integers as the highest precision, you get an answer of 7. You know the actual result was between 7 and 8. Similarly, if you get an answer of -0, you know the actual result lies between -1 and 0; if you get +0, you know it's between 0 and +1. If all you have is unsigned 0, it could be anywhere from -1 to 1 -- twice as uncertain. Hope this helps. - David Librik ###### Message-ID: <3B85B1AA.38645548@yahoo.com> From: CBFalconer Reply-To: cbfalconer@worldnet.att.net Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <3B84671C.80961215@yahoo.com> <3B85922B.D61D9229@thinkage.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 42 Date: Fri, 24 Aug 2001 02:07:10 GMT NNTP-Posting-Host: 12.90.170.131 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 998618830 12.90.170.131 (Fri, 24 Aug 2001 02:07:10 GMT) NNTP-Posting-Date: Fri, 24 Aug 2001 02:07:10 GMT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news.uni-stuttgart.de!uni-erlangen.de!newsfeeds.belnet.be!news.belnet.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!worldnet.att.net!135.173.83.72!wnfilter2!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88410 "Alan T. Bowler" wrote: > > CBFalconer wrote: > > > With sign-magnitude, or 1's complement. Even 2's complement > > machines normally use sign magnitude for floating point > > significand representation. > > No. Sign magnitude, while common for floating point, > certainly does not qualify for "normally used". Lots of > machines used complement notations. One of the neater > tricks, was to use a leading excess notation for the exponent > (like IBM and IEEE), and then represent negative numbers > by taking the two's complement of the whole bit image. > This allows you to use the same compare instruction > for fixed and floating point. This trick was used on > the SDS (later XDS) Sigma series. > > It seems to be the one trick that the IEEE format didn't > pick up. Interesting. However, I don't think compare is used anywhere near as often as the basic arithmetic operations, so I fail to see the usefulness. I may be missing something. I've only built two floating point packages in my day. The first used 2's complement significands, and worked, but was quite slow and complex. The second used sign/magnitude with suppressed leading bit, and was *much* faster. It replaced the first. Both used an offset exponent. And they were for use on an integer only CPU without multiply/divide. One of the major differences, as I recall, was the ease of doing proper rounding. Another was in the text <-> float conversion routines. A third was over/underflow detection, which I *did not* ignore. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest) ###### From: Joe Pfeiffer Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 24 Aug 2001 08:43:52 -0600 Organization: NMSU Computer Science Lines: 59 Message-ID: <1blmk9r00n.fsf@cs.nmsu.edu> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <9m4chk$fj0$1@panix3.panix.com> <9m5hdh$h66$9@bob.news.rcn.net> NNTP-Posting-Host: viper.cs.nmsu.edu X-Trace: bubba.NMSU.Edu 998664234 19028 128.123.64.113 (24 Aug 2001 14:43:54 GMT) X-Complaints-To: usenet@bubba.NMSU.Edu NNTP-Posting-Date: 24 Aug 2001 14:43:54 GMT X-Newsreader: Gnus v5.7/Emacs 20.5 Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news.uni-stuttgart.de!news.stealth.net!jfk3-feed1.news.digex.net!lax2-feed1.news.digex.net!intermedia!lynx.unm.edu!news.NMSU.Edu!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88213 jmfbahciv@aol.com writes: > In article <9m4chk$fj0$1@panix3.panix.com>, > librik@panix.com (David Librik) wrote: > > >In general, all machine numbers have intervals of the same size. > >For integers, this size is 1: an integer 3 corresponds to an > >interval [3, 4). This uniformity of size makes numerical error > >predictable and controllable in algorithms. There is no numerical error in integer algorithms. > >But there is an exception -- unsigned 0 has an interval twice as > >wide as the interval for any other number. For integers, 0 > >corresponds to the range (-1, 1). Uhhh... no. Not at all. An integer is an exact value, and doesn't represent an interval unless you want it to. And if you do, the interval you're suggesting is almost intentionally perverse; you're requiring that a positive number represent an interval ``above'' the number, but a negative number represent one ``below'' the number. It would be much more reasonable to have 3 represent [3, 4), and -3 represent [-3, -2). Even better than that would be to let 3 represent [2.5, 3.5) and -3 represent [-3.5, -2.5). > >Thus results are potentially twice as inaccurate, and error bounds > >analysis much less uniform, when you near 0. If you're doing error bounds analysis, you shouldn't be using integers. > >Now you can see what -0 and +0 are good for. Suppose, on a system > >with integers as the highest precision, you get an answer of 7. > >You know the actual result was between 7 and 8. Similarly, if > >you get an answer of -0, you know the actual result lies between > >-1 and 0; if you get +0, you know it's between 0 and +1. If all > >you have is unsigned 0, it could be anywhere from -1 to 1 -- twice > >as uncertain. > I've never heard it explained in this way. Neither have I. And I teach number representations; integers to sophomores, floating point to seniors. > > > >Hope this helps. > For instance, I thought a bit shift was a shorthand form > of multiplying or dividing. So doing a bit shift over > zero needs a hop over. A bit shift gives the same result as multiplying or dividing and integer by a power of two. I'm not sure what you mean by a bit shift over zero... -- Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605 Department of Computer Science FAX -- (505) 646-1002 New Mexico State University http://www.cs.nmsu.edu/~pfeiffer SWNMRSEF: http://www.nmsu.edu/~scifair ###### From: hawk@fac13.ds.psu.edu (Prof. Richard E. Hawkins) Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 24 Aug 2001 19:57:23 GMT Organization: Penn State University, Center for Academic Computing Lines: 27 Message-ID: <9m6bj3$1ifs@r02n01.cac.psu.edu> References: <3B69B776.9F86D65A@ev1.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> NNTP-Posting-Host: fac13.ds.psu.edu X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: hawk@fac13.ds.psu.edu (Prof. Richard E. Hawkins) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!informatik.tu-muenchen.de!comnets.rwth-aachen.de!news.rwth-aachen.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.cis.ohio-state.edu!news.ems.psu.edu!news3.cac.psu.edu!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88236 In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: >But seriously, how does a machine develope the concept of a negative >Zero and how is it properly used? It also has meaning in thermal physics. Temperature is a measure of disorder. At absolute 0, the system is in perfect order, with all components in their loowest possible energy states. For simplicity, consider a collection with only two states per item. When half of them are in their high state, you have reached maximum disorder, and the temperature is infinite. (ok, now's where it gets weird). Pump in more energy. One of the lows goes to a high. As the math works, you are at a negative absolute temperature. When all of the elements are in their high state, the temperature is negative absolute zero. My professor said that the technical name for this was, "hotter than hell" . . . hawk -- Prof. Richard E. Hawkins, Esq. /"\ ASCII ribbon campaign dochawk@psu.edu Smeal 178 (814) 375-4700 \ / against HTML mail These opinions will not be those of X and postings Penn State until it pays my retainer. / \ ###### From: librik@panix.com (David Librik) Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) Date: 24 Aug 2001 19:07:50 -0400 Organization: Icy Waters Underground, Inc. Lines: 17 Message-ID: <9m6mo6$8mm$1@panix3.panix.com> References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <9m4chk$fj0$1@panix3.panix.com> <9m5hdh$h66$9@bob.news.rcn.net> <1blmk9r00n.fsf@cs.nmsu.edu> NNTP-Posting-Host: panix3.panix.com X-Trace: news.panix.com 998694465 25084 166.84.1.3 (24 Aug 2001 23:07:45 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: 24 Aug 2001 23:07:45 GMT X-no-archive: yes X-Newsreader: NN version 6.5.6 (NOV) Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!informatik.tu-muenchen.de!comnets.rwth-aachen.de!news.rwth-aachen.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!panix!news.panix.com!panix3.panix.com!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88247 Joe Pfeiffer writes: >There is no numerical error in integer algorithms. You're right -- I confused inexact (floating point) arithmetic properties with exact (integer) arithmetic. The argument for a negative zero applies to FP -- assuming your FP hardware propagates the sign of zero throughout subsequent computations appropriately. But it doesn't really make sense with purely integer arithmetic. (Can I blame the late hour of posting? No, because that's prime programming time.) So the search for a justification of integer-only signed zero continues. - David Librik ###### Message-ID: <3B86E540.5ED1@indyx.net> From: freddy1X Reply-To: freddy1X Organization: IndyNet X-Mailer: Mozilla 3.04C-IndyNet (Win16; I) MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <9m6bj3$1ifs@r02n01.cac.psu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 24 Date: Fri, 24 Aug 2001 19:37:36 -0400 NNTP-Posting-Host: 209.183.70.50 X-Complaints-To: abuse@onemain.com X-Trace: nntp2.onemain.com 998699941 209.183.70.50 (Fri, 24 Aug 2001 20:39:01 EDT) NNTP-Posting-Date: Fri, 24 Aug 2001 20:39:01 EDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!nntp2.onemain.com.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88393 Prof. Richard E. Hawkins wrote: < cut weird physics, and moving to the most weird > > > (ok, now's where it gets weird). > > Pump in more energy. One of the lows goes to a high. As the math > works, you are at a negative absolute temperature. When all of the > elements are in their high state, the temperature is negative absolute > zero. My professor said that the technical name for this was, "hotter > than hell" . . . Could this state be more properly described as "when Hell freezes over"? -- do not stack over 10 high /\>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\/ /\ I may be demented \/ /\ but I'm not crazy! \/ /\<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\/ * SPAyM trap: there is no X in my address * || attatch FLAME here || \/ \/ X ###### Message-ID: <3B86E68A.4FB0@indyx.net> From: freddy1X Reply-To: freddy1X Organization: IndyNet X-Mailer: Mozilla 3.04C-IndyNet (Win16; I) MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 26 Date: Fri, 24 Aug 2001 19:43:06 -0400 NNTP-Posting-Host: 209.183.70.50 X-Complaints-To: abuse@onemain.com X-Trace: nntp2.onemain.com 998700271 209.183.70.50 (Fri, 24 Aug 2001 20:44:31 EDT) NNTP-Posting-Date: Fri, 24 Aug 2001 20:44:31 EDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.tesion.net!news.belwue.de!news-stu1.dfn.de!news-koe1.dfn.de!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!nntp2.onemain.com.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88398 Richard C. Steiner wrote: > > Here's one interesting in-depth discussion of Negative Zero on UNIVAC > 1100-series hardware: > > http://www.fourmilab.ch/documents/univac/minuszero.html > > It's an interesting side-effect of doing ones complement arithmetic. > Thanks for the link. I am sure glad that I can stay with machine control type aplications( integer arithmetic). The scary part is that I understand everything in the link, and the other parts of this sub-thread. -- do not stack over 10 high /\>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\/ /\ I may be demented \/ /\ but I'm not crazy! \/ /\<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\/ * SPAyM trap: there is no X in my address * || attatch FLAME here || \/ \/ X ###### Message-ID: <3B86FBDF.447FD2B2@thinkage.ca> From: "Alan T. Bowler" Organization: Thinkage Ltd. X-Mailer: Mozilla 4.5 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> <3B84671C.80961215@yahoo.com> <3B85922B.D61D9229@thinkage.ca> <3B85B1AA.38645548@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 48 Date: Fri, 24 Aug 2001 21:14:07 -0400 NNTP-Posting-Host: 192.102.11.4 X-Trace: nnrp1.uunet.ca 998702045 192.102.11.4 (Fri, 24 Aug 2001 21:14:05 EDT) NNTP-Posting-Date: Fri, 24 Aug 2001 21:14:05 EDT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!newshunter!cosy.sbg.ac.at!news.cs.utwente.nl!newsgate.cistron.nl!news.maxwell.syr.edu!sunqbc.risq.qc.ca!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88203 CBFalconer wrote: > > "Alan T. Bowler" wrote: > > > > CBFalconer wrote: > > > > > With sign-magnitude, or 1's complement. Even 2's complement > > > machines normally use sign magnitude for floating point > > > significand representation. > > > > No. Sign magnitude, while common for floating point, > > certainly does not qualify for "normally used". Lots of > > machines used complement notations. One of the neater > > tricks, was to use a leading excess notation for the exponent > > (like IBM and IEEE), and then represent negative numbers > > by taking the two's complement of the whole bit image. > > This allows you to use the same compare instruction > > for fixed and floating point. This trick was used on > > the SDS (later XDS) Sigma series. > > > > It seems to be the one trick that the IEEE format didn't > > pick up. > > Interesting. However, I don't think compare is used anywhere near > as often as the basic arithmetic operations, so I fail to see the > usefulness. I may be missing something. You don't need extra dedicated hardware (and/or microcode) for two more instructions (negate and compare) because the code uses the same fixed point instructions. This saves hardware and/or microcode space (this was in the days SSI where a "chip" implemented at most a few gates). Perhaps more important, it preserves opcode space, and almost all architectures seem to get tight on opcodes eventually. IIRC the Sigma only had 7 bits for opcode. > > I've only built two floating point packages in my day. The first > used 2's complement significands, and worked, but was quite slow > and complex. The second used sign/magnitude with suppressed > leading bit, and was *much* faster. It replaced the first. Both > used an offset exponent. And they were for use on an integer only > CPU without multiply/divide. I only ever implemented software floating point once, and that hardware (68000) had multiply/divide (if somewhat restricted.) The package never got much use, so I never got a good feel for the speed. ###### Message-ID: <3B84671C.80961215@yahoo.com> From: CBFalconer Reply-To: cbfalconer@worldnet.att.net Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 Date: Thu, 23 Aug 2001 02:20:39 GMT NNTP-Posting-Host: 12.90.168.137 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 998533239 12.90.168.137 (Thu, 23 Aug 2001 02:20:39 GMT) NNTP-Posting-Date: Thu, 23 Aug 2001 02:20:39 GMT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!news-out.worldnet.att.net.MISMATCH!wn3feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88650 freddy1X wrote: > > Edward Rice wrote: > > > > IF (arithmetic result) s1, s2, s3 > > > > which would go to s1 if the result was less than zero (distinct from > > negative, because we had a machine that distinguished negative zero from > > positive zero -- not all second-generation hardware could do that), s2 if > > it was positive or negative zero, and s3 if it was greater than zero. > > > > NEGATIVE??? Why, everybody knows that zero is an even number. And > don't get me started on what is considered an "odd" number. > > But seriously, how does a machine develope the concept of a negative > Zero and how is it properly used? Is it some perverted use of the > negative status flag? I do recall a description of the 8087 coprocessor > handling of devide-by-zero errors: something about representing negative > and positive infinity. But I still wonder if there is a practical use > for such arithmetic tomfoolery. With sign-magnitude, or 1's complement. Even 2's complement machines normally use sign magnitude for floating point significand representation. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest) ###### Message-ID: <3B84678C.9CEFB8BD@yahoo.com> From: CBFalconer Reply-To: cbfalconer@worldnet.att.net Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.folklore.computers Subject: Re: negative zero( was: YKYGOW...) References: <3B69B776.9F86D65A@ev1.net> <20010811091722.30ddec6c.steveo@eircom.net> <997523567snz@dsl.co.uk> <3B8433C8.16AD@indyx.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 23 Date: Thu, 23 Aug 2001 02:20:41 GMT NNTP-Posting-Host: 12.90.168.137 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 998533241 12.90.168.137 (Thu, 23 Aug 2001 02:20:41 GMT) NNTP-Posting-Date: Thu, 23 Aug 2001 02:20:41 GMT Path: chonsp.franklin.ch!pfaff.ethz.ch!news-zh.switch.ch!news-ge.switch.ch!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!news-out.worldnet.att.net.MISMATCH!wn3feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Xref: chonsp.franklin.ch alt.folklore.computers:88523 "Richard C. Steiner" wrote: > > In article <3B8433C8.16AD@indyx.net>, freddy1X wrote: > > >But seriously, how does a machine develope the concept of a negative > >Zero and how is it properly used? Is it some perverted use of the > >negative status flag? > > Here's one interesting in-depth discussion of Negative Zero on UNIVAC > 1100-series hardware: > > http://www.fourmilab.ch/documents/univac/minuszero.html > > It's an interesting side-effect of doing ones complement arithmetic. If you do arithmetic with a subtractor, you can avoid having +ve zero ever appear. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@XXXXworldnet.att.net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce@ftc.gov (for spambots to harvest)