This challenge involves the mathematical constant pi.

learn more… | top users | synonyms

3
votes
1answer
324 views

Solve the CodeSprint4 Leibniz code golf challenge in Python in 66 characters

Check out this challenge: https://www.hackerrank.com/codesprint4/challenges/leibniz (The competition has already ended, so I'm just curious about the Python solution, which the organizers refused to ...
10
votes
19answers
2k views

Calculate pi to 5 decimals

This comes from http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/ "Given that Pi can be estimated using the function 4 * (1 – 1/3 + 1/5 – 1/7 + …) with more terms ...
13
votes
10answers
848 views

Good rational approximations of pi

Write a program that prints out all the good rational approximations of pi with denominator < 1000000, in increasing denominator order. a/b is a "good rational approximation" of pi if it is closer ...
10
votes
8answers
2k views

Calculate digits of Pi

This is a somewhat different task. Calculate1024 hexadecimal digits of pi, beginning at the 1024th hexadecimal place. Formally: Your program should complete in less then 1 minute and produce the ...
9
votes
4answers
811 views

Calculate 500 digits of pi

Write a program to calculate the first 500 digits of pi, meeting the rules below: It must be less than 500 characters in length. It cannot include "pi", "math.pi" or similar pi constants, nor may it ...