home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / sci / math / 13172 < prev    next >
Encoding:
Text File  |  1992-10-14  |  642 b   |  21 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!gumby!wupost!mont!mont!stephen
  3. From: stephen@mont.cs.missouri.edu (Stephen Montgomery-Smith)
  4. Subject: Re: Calculating pi: help!
  5. Message-ID: <stephen.719088307@mont>
  6. Organization: University of Missouri
  7. References: <Bw304E.LKu@mentor.cc.purdue.edu> <7557@charon.cwi.nl>
  8. Date: 14 Oct 92 18:45:07 GMT
  9. Lines: 10
  10.  
  11. In <7557@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes:
  12.  
  13. >int a=10000,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,g=c*2;c
  14. >-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b);}
  15.  
  16.  
  17. I would be very interested to know how this program works.
  18.  
  19. Stephen
  20.  
  21.