Computer problems,Computer help
*AX SOFT>>>Programming & Design

Are there any good resources for creating pi calculation programs?


I'm working on a benchmarking application (yes yes i know been done but its a project to help further my programming abilities.) And i would like to include pi calculation in the tests, however i have been unable to find good resources on creating algorithms for calculating it's value.

Well, I found a recursive arctan formula.
The General Formulae
We have just seen that there are infinitely many formulae for Pi using the Fibonacci numbers! They are:
Pi/4 = arctan(1)
= arctan(1/2) + arctan(1/3)
= arctan(1/2) + arctan(1/5) + arctan(1/8)
= arctan(1/2) + arctan(1/5) + arctan(1/13) + arctan(1/21)
= arctan(1/2) + arctan(1/5) + arctan(1/13) + arctan(1/34) + arctan(55)
=...
or, putting these in terms of the Fibonacci numbers:
Pi/4 = arctan(1/F1 )
= arctan(1/F3) + arctan(1/(F4)
= arctan(1/F3) + arctan(1/F5) + arctan(1/F6)
= arctan(1/F3) + arctan(1/F5) + arctan(1/F7) + arctan(1/F8)
= arctan(1/F3) + arctan(1/F5) + arctan(1/F7) + arctan(1/F9) + arctan(1/F10)
= ...

You can use an algorithm to continue this recursion until you achieve the accuracy you desire.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Can you PLEASE make me a banner?

    Write me at my email addy and I'll see what I can do to help you.

    ...
  • I got the system time using java.sql.time package,i want time before 12:00 O'clock print good morning how?

    Here's a start. package com.yahoo.answers; import java.util.Date; public class GoodDay { public static void main(String[] args) { Date now = new Date(); int hours = now.get...

  • Visual Basic???

    Where are you inserting the code that you just showed us > MsgBox("Unable to Perform Function.",0,"Error") IT has to be in the OnClick Event of the Button on the form. ...

  • What is a .reg file?

    hi, try this link to download .reg file.. ...

  • CSS: link code help!?

    You forgot to close your <a> tag. <a href= "aboutme-mock-up-CSS.html"> about me </a></div>

    ...
  • How can i put an affilite choice in my website?

    You need a website with database support. Normally these kind of websites uses PHP and MySQL so you can go for Linux hosting. Try www.hostgator.com its a good one.. I am using the same service...

  • Complicated document.write question in javascript?

    The problem occurs with how you are using the variable "sld". When the link is written out, it actually writes out "id2" so Javascript thinks that it is a variable; which doesn...

  • Which code represents character data boxes and graphical symbols?

    Most English-only programs get by fine with ASCII but if you need to support non-English text you will want to take a look at Unicode. I don't think EBCDIC is used anywhere anymore. Progra...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster