home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / programm / 3560 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1013 b   |  30 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!cs.utexas.edu!torn!nott!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: Re: how to calculate PI
  5. Message-ID: <1993Jan24.044329.8505@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <peterd.727508100@tscc2> <LOWRY.93Jan20104500@rotor.watson.ibm.com>
  8. Date: Sun, 24 Jan 1993 04:43:29 GMT
  9. Lines: 19
  10.  
  11. In article <LOWRY.93Jan20104500@rotor.watson.ibm.com> lowry@watson.ibm.com (Andy Lowry) writes:
  12. >In article <peterd.727508100@tscc2> peterd@tscc2.macarthur.uws.edu.au () writes:
  13. > > Anyone out there have an algorithm for calculating PI ?
  14. >
  15. >One of the coolest formulas I've seen in Gregory's formula:
  16. >
  17. >  pi/4 = 4*atan(1/5)-atan(1/239)
  18. >
  19. >It's one of those formulas that makes you want to know how in the
  20. >world anybody ever stumbled across it.
  21.     [...stuff deleted...]
  22.  
  23.     Huh?  What's wrong with just plain ol'
  24.         pi=4.0*atan(1.0);
  25.  
  26. -- 
  27. John A. Grant                        jagrant@emr1.emr.ca
  28. Airborne Geophysics
  29. Geological Survey of Canada, Ottawa
  30.