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