karan / Projects

:page_with_curl: A list of practical projects that anyone can solve in any programming language.
https://twitter.com/karangoel
MIT License
45.08k stars 10.57k forks source link

Actually computes PI #6

Closed remram44 closed 11 years ago

remram44 commented 11 years ago

Using math.atan() is of course cheating; it is using the answer to compute it. If math is allowed, we might as well do 4*atan(1) or just simply math.pi.

This can certainly be optimized, if anyone cares.

karan commented 11 years ago

Sorry not accepting pull requests for replacing my code. If you have suggestions for adding or removing problems, feel free to contribute.

remram44 commented 11 years ago

Computing Pi is my suggestion, as discussed there. You are simply getting the value of Pi coded in the math library.

karan commented 11 years ago

Yes, that is why #5.

Stephenx75 commented 11 years ago

http://rosettacode.org/wiki/Pi#Python

heres the magical formula

karan commented 11 years ago

I don't understand a whole lot of it because I still need to touch base with a lot of concepts. But thanks for the link!

karan commented 11 years ago

Alright here we go: https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md

If you'd like to contribute, please follow the steps, and I'd be happy to merge the changes!

remram44 commented 11 years ago

Won't do.

These are your problems, and you are free to not solve them. Still, my point of view is that you completely missed the point of this particular one.

karan commented 11 years ago

Initially I did, until people pointed it out. But I do plan on re-solving the problem with a more mechanical approach. If you do not want to open the request, I'll close this issue. Please open a new merge request when you want to.