home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / 17744 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  1.1 KB

  1. From: daveb@hpgrla.gr.hp.com (Dave Boyd)
  2. Date: Tue, 5 Jan 1993 20:51:00 GMT
  3. Subject: Re: Pi and math in general
  4. Message-ID: <53780001@hpgrla.gr.hp.com>
  5. Organization: Hewlett-Packard, Greeley, CO
  6. Path: sparky!uunet!cs.utexas.edu!usc!wupost!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpgrla!daveb
  7. Newsgroups: sci.math
  8. References: <memo.837764@cix.compulink.co.uk>
  9. Lines: 37
  10.  
  11. In sci.math, icdocherty@cix.compulink.co.uk (Ian Docherty) writes:
  12.  
  13. >In-Reply-To:  Clayten_Hamacher@mindlink.bc.ca (Clayten Hamacher)
  14.  
  15. > TITLE: Pi and math in general
  16.  
  17.   ... stuff deleted ...
  18.  
  19. >INITIAL VALUES
  20.  
  21. >        A = 1
  22. >        X = 1
  23. >        B = 1 / root(2)
  24. >        C = 1 / 4
  25.  
  26. >LOOP:
  27. >        Y = A
  28. >        A = (A + B) / 2
  29. >        B = root(B * Y)
  30. >        C = C - X * (A - Y) * (A - Y)
  31. >        X = 2 * X
  32. >        print the value of (A + B) * (A + B) / (4 * C)
  33. >        repeat from LOOP
  34.  
  35. >Where 'root' means take the square root
  36.  
  37. >Ian.
  38.  
  39.      Interesting.  A quick trial shows this appears to work.  Could
  40. someone post (or email) a reference or a brief explanation of what's
  41. going on here?
  42.  
  43.      Thanks,
  44.  
  45.      Dave Boyd
  46.      Hewlett-Packard, Greeley, Colorado
  47.      Standard Disclaimers Apply
  48.