Tagged Questions

This challenge involves the mathematical constant pi.

learn more… | top users | synonyms

9
votes
12answers
837 views

Piem validator programme

Write a program that defines a function that can check if a string variable called "anything you want or inputted by the user" is or not a piem. (piem = a story or poem in which the word lengths ...
11
votes
2answers
403 views

Pirrational Numbers

Pi is an irrational number, which means that its decimal representation never terminates or repeats itself. Pi truncated to 41 decimal digits (40 places) is ...
10
votes
4answers
893 views

5 Seconds to Find Pie

Pi times e (or Pie if you like ambiguous notation) to 100 decimal places is: 8.5397342226735670654635508695465744950348885357651149618796011301792286111573308075725638697104739439... (OIES A019609) ...
4
votes
3answers
316 views

When is my piversary?

Since I want to celebrate this definitely not nerdy event, your job is to calculate the piversary (pi-anniversary) of a given date. Input Your code has to have a possibilty to input a date in the ...
-1
votes
4answers
922 views

Calculate the most digits of pi [closed]

There are a lot of challenges on this site regarding pi, but none that challenge you to calculate as many digits of pi as possible. As you all may know, pi in its decimal form goes on for infinity, ...
13
votes
6answers
788 views

PI window encryption

This is a simple encryption method that uses PI digits to encode a message, the method is simple: The key is just a positive integer that indicates where the window starts then: Given a string to ...
22
votes
8answers
7k views

Pi is still wrong

Pi is Wrong A common method of computing pi is by throwing "darts" into a 1x1 box and seeing which land in the unit circle compared to the total thrown: loop x = rand() y = rand() ...
46
votes
66answers
15k views

Output Pi without math

In as few bytes as possible, your job is to write a program that outputs: 3.14 In celebration of a late Pi day of course! :) Rules You can do it anyway you like, but there are some restrictions. ...
50
votes
43answers
7k views

π Day puzzle for 3/14

Happy π Day. The goal of this question is to calculate the area for a circle of radius 3, where A = πr². The catch is that you have to use the constant π that is defined in a different language ...
2
votes
2answers
395 views

Get as close to pi as you can [closed]

Your job is to write a program to find the closest number to PI. Let me clarify. You will first choose a number type. Let us say you choose Integer (in an actual answer, you cannot). Your program ...
14
votes
63answers
6k views

Pi Calculation Code Golf

The Challenge You must calculate pi in the shortest length you can. Any language is welcome to join and you can use any formula to calculate pi. It must be able to calculate pi to at least 5 decimal ...
12
votes
10answers
1k views

stupid restrictions and desert

So, you were sitting at your desk, golfing a program to calculate the first 20 digits of pi, and along comes your boss and throws your apple IIe out the window. You are now working on a new project ...
4
votes
3answers
774 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 ...
13
votes
22answers
3k 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 ...
17
votes
11answers
1k 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 ...
12
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 ...
16
votes
8answers
2k 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 ...