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: "James Giles" Subject: Re: Fortran or Ada? Date: 1998/10/06 Message-ID: <6veadj$rqj@bgtnsc02.worldnet.att.net>#1/1 X-Deja-AN: 398450692 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> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Organization: AT&T WorldNet Services Newsgroups: comp.lang.fortran,comp.lang.ada Date: 1998-10-06T00:00:00+00:00 List-Id: 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. -- J. Giles