From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!lon-transit.news.telstra.net!ken-in.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!53ab2750!not-for-mail From: "robin" Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <20060712.7A4E6E0.D028@mojaveg.lsan.sisna.com> <44B734D5.6070501@comcast.net> <1hifsfw.11gje3142w54vN%nospam@see.signature> Subject: Re: ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Message-ID: Date: Mon, 17 Jul 2006 12:44:30 GMT NNTP-Posting-Host: 203.54.184.253 X-Complaints-To: abuse@bigpond.net.au X-Trace: news-server.bigpond.net.au 1153140270 203.54.184.253 (Mon, 17 Jul 2006 22:44:30 EST) NNTP-Posting-Date: Mon, 17 Jul 2006 22:44:30 EST Organization: BigPond Internet Services Xref: g2news2.google.com comp.lang.ada:5736 comp.lang.fortran:12087 comp.lang.pl1:2017 Date: 2006-07-17T12:44:30+00:00 List-Id: Richard Maine wrote in message <1hifsfw.11gje3142w54vN%nospam@see.signature>... >Bob Lidral wrote: > >> Years ago, I did a lot of programming on CDC CYBERS. There were some >> operations that could result in either positive or negative zero. It >> was also difficult to do character comparisons. > >Me too. On the other hand, in other situations it was nice that you >never had to worry about range asymetry. But you did! The size of a CDC Cyber integer was 60 bits. But if you used integer multiply, the operands had to be 48 significant bits maximum, otherwise the hardware interpreted the operands as floating-point, and did a floating-point multiplication, with catastrophically wrong results. >Sometimes one form is better. Sometimes the other. Sometimes it makes >little difference. Some implementations of ones complement used two forms of zero (zero and all ones), which required two tests. Such implementations were inferior. >I consider claims that either form is universally and obviously superior >to be indicative of a narrow viewpoint. The proof of the pudding is in the eating. How many machines now offer ones complement arithmetic? The forms that have persisted are twos complement for integers, and signed magnitude (for floating-point). It needs to be pointed out that on (early) serial machines, ones complement was clearly inferior because of the need for an additional cycle for the end-around-carry (not to mention the additional hardware to carry that out). Then there would have been the need to cater for the two forms of zero, requiring more hardware. I can think of at least two machines where ones complement would have been completely impractical.