-
Notifications
You must be signed in to change notification settings - Fork 249
Leibniz's formula for calculating pi #278
Comments
Hi @Archie4575 ! Please go on ahead and raise a PR for the same, linking this issue. I am assigning this issue to you. Please consider starring the repo, if you have not already to encourage further contributions. |
Yeah, sweet. Should I leave the thread open for those who might want to write it in another language? @aditya109 |
I would like to add content to this issue in C, Java, Python and Javascript. |
@aditya109 I would like to give it a try as well 😄. |
we can also use recursion if I'm not wrong 🤔 |
@hryxna yeah just loop it. You can divide your answer by the actual Pi to get a percentage accuracy if you want. Also I’m not sure if using recursion would be advantageous and it also might run into a maximum recursion depth. |
@gustavoplenamente yeah go ahead. Don’t worry about a version standard. |
Yeah, recursion would add space complexity to the solution. |
Don't worry @Archie4575 & @gustavoplenamente I won't just directly go for recursion though 😬. |
can you please assign this task to me?? |
The following formula is named after Gottfried Wilhelm von Leibniz, a prominent German polymath who lived from 1646-1716.
or
This program will iterate over this pattern 'k' times, with 'k' being defined by the user. The larger the value of 'k',
the closer the approximation of pi.
I already have already made a stand-alone C++ program! here, which I will convert to a function and add to this project. This function prototype will be as follows:
If someone wants to do the same with another language, feel free.
The text was updated successfully, but these errors were encountered: