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, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,9f0bf354542633fd X-Google-Attributes: gid1094ba,public X-Google-Thread: 103376,d901a50a5adfec3c X-Google-Attributes: gid103376,public From: Toon Moene Subject: Re: Fortran or Ada? Date: 1998/10/06 Message-ID: <6vdmac$3nt$1@newnews.nl.uu.net>#1/1 X-Deja-AN: 398342030 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> Organization: Moene Computational Physics, Maartensdijk, The Netherlands Newsgroups: comp.lang.fortran,comp.lang.ada Date: 1998-10-06T00:00:00+00:00 List-Id: dewarr@my-dejanews.com wrote: > In article , > "Ian St. John" wrote: > > Testing by itself can never guarantee correct code. The testing is just to > > determine syntax errors, oversights, etc. > That's a bit strong, there are definitely cases where testing can be > exhaustive, e.g. in checking out a sqrt routine for IEEE short form > arithmetic. Indeed it is almost practical to do exhaustive testing on > long format division (which would have saved Intel many millions of > dollars :-) On what platform would that be true ? (granted, the error also showed up on 32-bit FDIV, but was originally found using 64-bit arithmetic). There are about 2**(23*2) single precision floating division pairs because only the mantissa was relevant (give or take a factor of two). Given that the Pentium could natively do an FDIV in 39 cycles, that means that at 78 Mhz (for ease of reference), you'd need 2**45/10**6 seconds, or about (2**20 ~ 10**6) 32 million seconds ~ 1 year. Note that this is just the time for the FDIVs, not the comparisons. I would be interested in a testing strategy that would do an exhaustive search on the double precision space. -- Toon Moene (mailto:toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 g77 Support: mailto:fortran@gnu.org; egcs: mailto:egcs-bugs@cygnus.com