home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!swrinde!emory!ogicse!qiclab!leonard
- From: leonard@qiclab.scn.rain.com (Leonard Erickson)
- Newsgroups: comp.programming
- Subject: Re: how to calculate PI
- Message-ID: <1993Jan23.080718.24306@qiclab.scn.rain.com>
- Date: 23 Jan 93 08:07:18 GMT
- Article-I.D.: qiclab.1993Jan23.080718.24306
- References: <peterd.727508100@tscc2> <LOWRY.93Jan20104500@rotor.watson.ibm.com> <c8h3xpm@rpi.edu>
- Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
- Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
- Lines: 24
-
- rogerj@aix.rpi.edu (Diversion (Jeff Rogers)) writes:
-
- >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)
-
- >Why not just
- > pi/4=atan(1)?
-
- On several different machines I've found that 2*atan(maxreal) gives
- a more accurate value for pi than 4*atan(1). And you don't really need
- to be *that* accurate in the value for "maxreal". 1e[max exponent]
- works fine.
-
- --
- Leonard Erickson leonard@qiclab.scn.rain.com
- CIS: [70465,203] 70465.203@compuserve.com
- FIDO: 1:105/51 Leonard.Erickson@f51.n105.z1.fidonet.org
- (The CIS & Fido addresses are preferred)
-