[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Sammenligning af to tal



Sune Fischer wrote:

> Du kan altid spørge mig hvis du ikke kan få det til at funge', jeg har
> fået det til at køre, men en beregning med 700000 decimaler tog mere
> end 24 timer på min maskine (K6 233 MHz), så man skal have tålmodighed.

Hm. Host.

700000 decimaler på 24 timer?

Det har taget 373 sekunder at beregne pi med 1048576 decimaler på
en PII, 233 MHz. Prøv at kigge på pi_agm, der er links på følgende side:

http://www.geocities.com/EnchantedForest/5815/program.html

Jeg har beregnet pi med 134,217,728 decimaler på en Silicon Graphics
maskine, det tog godt en uge. Det havde nok været hurtigere på en
Pentium, men SGI'en var den eneste maskine i min omgangskreds der
havde memory nok. Det kræver 5 bytes per decimale ciffer. Pentium'en
er hurtigere, fordi man regner med lidt flere betydende cifre i
coprocessoren end man gør på en SGI, dette gør at man kan lave
større Fourier transformationer uden at afrundingsfejlene slår
igennem.

Lidt timing, i sekunder, på en Silicon Graphics Origin 200 (1Gb, R10000)
mod en PII, 233 MHz, 160 Mb:

#dec       SGI      PII     
  524288    59.36  106.29  
 1048576   166.05  373.15  
 2097152   482.51  713.14  
 4194304  1624.99 1927.56 
 8388608  5915.15 3109.52 
16777216 17901.25 8319.27 

Det skal dog bemærkes, at jeg har gjort meget lidt for at optimere
koden til en SGI, med en større indsats kunne tallene måske se helt
anderledes ud...

pi med 134,217,728 decimaler vil i øvrigt fylde godt 10000 sider papir,
med tryk på begge sider.

Mogens

PS:

Hvorfor bruger man tid på dette? Tja, prøv at læse Carl Sagan's
"Contact".
-- 
Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: sslug@sslug Homepage: http://www.crc.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *