[Shootout-list] n-body anomalies

Greg Buchholz sleepingsquirrel@yahoo.com
Thu, 5 May 2005 17:29:52 -0700 (PDT)


--- Jon Harrop <jon@ffconsultancy.com> wrote:
> On Thursday 05 May 2005 03:44, Greg Buchholz wrote:
> >     Just a few questions about the n-body test.  It looks like we're
> > mostly computing the amount of round-off error in simulating our
> > algorithm, correct?
> 
> Do you mean most of the code or most of the time is spent computing
> round-off error?

    Both?  It looks to me like it is computing the energy of the bodies
before the simulation, performing the simulation, calculating the final
energy, and comparing how well the energy was conserved.  Assuming the
physics is correct, the only energy lost from the system is from
round-off error.  Using rational numbers instead of doubles would have
resulted in zero difference in the two answers.

Greg Buchholz



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250