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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d901a50a5adfec3c X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,9f0bf354542633fd X-Google-Attributes: gid1094ba,public From: dewarr@my-dejanews.com Subject: Re: Fortran or Ada? Date: 1998/10/07 Message-ID: <6vfgoe$ipa$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 398589706 References: <3617AA49.340A5899@icon.fi> <6v9s4t$egn$1@ys.ifremer.fr> <3618dc33.0@news.passport.ca> <6vbhhc$5kj$1@nnrp1.dejanews.com> <6vdfq4$p1$1@nnrp1.dejanews.com> <6vdnqe$3nu@bgtnsc02.worldnet.att.net> <361A98CB.444AD094@lmco.com> <6veadj$rqj@bgtnsc02.worldnet.att.net> X-Http-Proxy: 1.0 x10.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Oct 07 10:45:34 1998 GMT Newsgroups: comp.lang.fortran,comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-07T00:00:00+00:00 List-Id: In article <6veadj$rqj@bgtnsc02.worldnet.att.net>, "James Giles" wrote: > > Mark A Biggar wrote in message <361A98CB.444AD094@lmco.com>... > >James Giles wrote:>> There are 2^128 different possible divide operations (each operand > >> having 2^64 different possible values) - and that's assuming that you > >> don't have to test each pair of operands for each possible value of > >> the exponent and sign (in which case there are nearly 2^160 different > >> operand pairs - each operand having 2^80 different values). Now, > >> assuming that a Pentium class machine can test 100 million operations > >> per second (an overestimate to say the least), it would take over 10^30 > >> seconds to test all 2^128 divides. This still assumes you have an > >> independent source of the correct answer for each divide to test > >> against! Running, say, 1000 machines in parallel, each testing different > >> divides, would reduce the time needed to "just" 10^27 seconds. A > >> year has on the order of 3*10^7 seconds. > > > >You don't actuall actually have to test all 2^128 cases to be "exhaustive". > >First off you can factor the handling of exponents from that of mantissa's. > > Yes, I assumed that (as I explicitly pointed out). If you couldn't separate > the significands from the exponent parts the number would be 2^158 cases > (minus a few - since there are NAN's that needn't be tested). If, further, > you couldn't separate out the sign bit, you'd have 2^160 cases. Remember, > the Intel chip uses extended-double internally - each operand is 80-bits > wide. > > >In addition, the pentium algorithm is a base 4 division method, it works > >two bits at a time and uses some ROM table look-ups for partial results. > >The errors were in those tables, not the algorithm. A set of test cases that > >ran through all possible exponents combinations, and a sufficient set > >of mantissa's such that every table entry was use at least once would have > >found the pentium bug. Someone later said that such a test set could > >have been run in less than 10 minutes. > > Yes, it's always possible, *after* you've found the bug, to think of a test > which would have detected it in short order. I was addressing the claim that > a genuinely exhaustive test was possible. It clearly wasn't. Reread my original post, no one ever claimed that a genuinely exhaustive test was possible in this case. I said it was "almost possible", by which I meant precisely that the critical component, namely the table lookup part of the algorithm, could indeed have been tested exhuastively, and should have been, no hindsight required! -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own