Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!nettles From: nettles@b.gp.cs.cmu.edu (Scott Nettles) Newsgroups: comp.arch Subject: Re: John von Neumann, sqrt instr Message-ID: <5911@pt.cs.cmu.edu> Date: 19 Aug 89 16:07:40 GMT References: <21353@cup.portal.com> <25643@obiwan.mips.COM> <1513@l.cc.purdue.edu> <2376@wyse.wyse.com> <11758@cgl.ucsf.EDU> Distribution: usa Organization: Carnegie-Mellon University, CS/RI Lines: 22 In article <11758@cgl.ucsf.EDU> seibel@cgl.ucsf.edu (George Seibel) writes: > Molecular Dynamics people are rather keen on 1/sqrt(r). It's used >in evaluating the coulomb interaction between two charged particles. >It wouldn't be unusual to do it 10^10 to 10^11 times in a run. On some >machines it may amount to half the cycles. Good MD code will NOT use square root this way. By working with potentials that are transformed to use the square of the distance, one can avoid doing these costly operations for every pair potential, resulting in substantial preformance improvements. The fastest MD codes I know of use table look up and interpolation to evaluate potential functions. Another advantage of this technique is that it works for complex potentials, as well as simple ones. At least from my experience (and I've done both many CPU day and week long scientific calculations, and worked with top researchers in computer architecture), the best thing computer designers can do is make the machine as fast as possible on 64 bit floating point multiply and adds (and maybe add hardware assist for divide), and let the software do the rest. Cray has the right idea, but we knew that already. Scott Nettles Scott.Nettles@cs.cmu.edu