1 2 Previous Next 24 Replies Latest reply: Oct 16, 2007 2:09 AM by 800282 Go to original post RSS
      • 15. Re: Calculating Pi
        807587
        As far as I know there are very few series that converge more slowly to pi than that one.
        It would be pretty hard to converge more slowly, given that the term ratio tends to unity.
        • 16. Re: Calculating Pi
          JosAH
          A very fast approximation of by was invented by Machin --
          pi/4= 4*atan(1/5)-atan(1/239)
          where the Taylor expansion of the arctangent function is used.

          Nice little anecdote: in a Dutch Bible in the book of Kings, pi is approximated as "the circumference
          equals three times the diameter of a circle". That's written in verse 22:7

          kind regards,

          Jos
          • 17. Re: Calculating Pi
            JosAH
            A very fast approximation of by was invented by Machin
            "of by was"? What nonsense is that? What moron wrote this? I certainly didn't; 't must've been some
            glitch in my broadband connection or something ... or a temporary insanity of a keyboard ... but not me.
            • 18. Re: Calculating Pi
              807587
              pi/4= 4*atan(1/5)-atan(1/239)
              That's usable, but not "very fast" unless by comparison with atan(1).
              • 19. Re: Calculating Pi
                807587

                <Homer accent>

                Mmmmmm.... pie....

                </Homer accent>
                • 20. Re: Calculating Pi
                  JosAH
                  pi/4= 4*atan(1/5)-atan(1/239)
                  That's usable, but not "very fast" unless by comparison with atan(1).
                  True, I shouldn't have said "very" fast. Here's a nice link from the MathPages, elaborating a bit
                  on this arctangent Taylor expansion stuff -- http://www.mathpages.com/home/kmath373.htm

                  kind regards,

                  Jos
                  • 21. Re: Calculating Pi
                    807587
                    Hi, umm... I have to do the same assignment for my programming class,

                    but i have only learned the basic things of java (standalone, loops, selection, etc <but not too much>)

                    and i am expected to do a program like this,

                    so is there a MUCH easier way of doing this program

                    with only loops and simple stuff like that?
                    • 22. Re: Calculating Pi
                      796440
                      so is there a MUCH easier way of doing this program

                      with only loops and simple stuff like that?
                      The code samples provided so far are about as simple as it comes, and they only use "loops and simple stuff like that."
                      • 23. Re: Calculating Pi
                        807592
                        I am having trouble doing this with a university prac....

                        Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ..

                        Can anyone help out please, i'm not very good at Java....
                        • 24. Re: Calculating Pi
                          800282
                          nick_8188 wrote:
                          I am having trouble doing this with a university prac....

                          Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ..

                          Can anyone help out please, i'm not very good at Java....
                          \\
                          No time to waist then:
                          http://java.sun.com/docs/books/tutorial/getStarted/index.html
                          1 2 Previous Next