CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 07:23:36 GMT
content-type: text/html; charset=utf-8
cf-ray: 9662a1cce996c7cf-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=5fa03f58-7c7a-41f5-a0d3-e959f732bb2c; expires=Tue, 28 Jul 2026 07:23:36 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: f1a83b8e-b403-40f1-884f-6585a43a744f
x-worker-origin-response-time: 420000000
x-dns-prefetch-control: off
set-cookie: prov=5fa03f58-7c7a-41f5-a0d3-e959f732bb2c; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=Vq_qlW.AviRB2GkuYXeyPQ4seRHGMZB2CB7CYT.lGk8-1753687416-1.0.1.1-G6fY9zGSOfK0tSb2TGSLTTDoWyahQ08beVEKtpbnADAEMmw8uHvR.wrkPEtH3TotZkGfYKZUnF9lNzswxfnCjuKm.VS3YmXeFIl89E_NAIw; path=/; expires=Mon, 28-Jul-25 07:53:36 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=u8LltWcJ18HSqj1__5p2nKnfWiQg4BJDzBb9CdxVgec-1753687416265-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'pi' Questions - Code Golf Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [pi]
This tag is for challenges involving the mathematical constant pi, the ratio of a circle's circumference to its diameter.
63 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
23
votes
6
answers
2k
views
Computing Pi with iF*ck
Objective
Compute \$\pi\$ using nothing but \$i\$ (\$\sqrt{-1}\$).
Guidelines
ONLY exponentiation and multiplication may be used (i.e. \$i^i\$ or \$ii\$)
No additional symbols may be used (so no ...
8
votes
1
answer
366
views
Sequence of programs that prints the next one with length growth being equal to π
Challenge
You must produce an infinite sequence of programs \$P_0, P_1, P_2,\$ … such that each program \$P_n\$, when run, prints the exact source code of \$P_{n+1}\$ and then halts.
Each program \$...
18
votes
11
answers
2k
views
Count squares in my pi approximation
One way to approximate π is the following: Start by drawing a 2x2 square with a quarter-circle in it. Then, the area of the quarter-circle is π.
We can approximate this area by filling it with ...
20
votes
21
answers
968
views
Rabinowitz-Wagon \$\pi\$ formula
In 1995, Stanley Rabinowitz and Stan Wagon found an interesting algorithm to generate the digits of \$\pi\$ one by one without storing the previous results. The algorithm is called the spigot ...
15
votes
13
answers
6k
views
Print 100 digits of π
Your challenge is to print any 100 consecutive digits of π. You must give the index at which that subsequence appears. The 3 is not included.
For example, you could print any of the following:
...
17
votes
37
answers
3k
views
Calculating π using the Gregory Leibniz series until n terms
based off my previous challenge, this wikipedia article, and a Scratch project
Your task: given i, calculate \$\pi\$ till i ...
21
votes
17
answers
3k
views
10
votes
1
answer
532
views
Turing Machine that outputs pi
Turing Machine Preliminaries
A Turing machine is specified by the following data
A finite set of symbols S = \$\{s_1,s_2,...\}\$
A finite set of states M = \$\{m_1,m_2,...\}\$
A partially defined ...
18
votes
5
answers
2k
views
-4
votes
7
answers
451
views
Print om sign with pi
This time I will give you an easy challenge:
Print the Om sign with \$\pi\$!(Sorry for many challenges with \$\pi\$)
Here is the om sign drawn using pi numbers:
...
9
votes
8
answers
2k
views
22
votes
14
answers
3k
views
Elastic collisions between blocks
The 3Blue1Brown Youtube channel released a video a year ago called "Why do colliding blocks compute pi?" which describes a model where a block A of mass \$a\$ ...
21
votes
22
answers
7k
views
Pi to the power y, for small y's
Input
This task takes no input.
Output
Your code should compute and print (or return)
\$\pi^y\$ for all \$y = \frac11, \frac12, \frac13, \frac14, \frac15, \frac16, \frac17, \frac18, \frac19, \frac1{...
user9207
-3
votes
6
answers
2k
views
Output first \$n\$ digits of \$\pi^{1/\pi}\$
This challenge is to produce the shortest code for the constant \$\pi^{1/\pi}\$. Your code must output the first \$n\$ consecutive digits of \$\pi^{1/\pi}\$, where \$n\$ is given in the input. ...
user9207
9
votes
9
answers
755
views
Pi Day: Determine if a list of words is correct Pilish
Background
Though this is a bit late for Pi Day, I saw an article about Pilish and thought it would make a great challenge. Pilish is created by using a sequence of words where each word's length ...
Welcome to Code Golf and Coding Challenges Stack Exchange! This is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
code-golf × 53
math × 21
sequence × 9
approximation × 7
number × 4
random × 4
code-challenge × 4
restricted-time × 3
date × 3
arithmetic × 3
string × 2
number-theory × 2
underhanded × 2
rational-numbers × 2
integer × 2
self-referential × 2
decision-problem × 1
physics × 1
base-conversion × 1
floating-point × 1
code-generation × 1
more related tags
Hot Network Questions
- Will an error in two of my published papers affect my PhD thesis evaluation?
- Can Spi flash memory's contents be corrupted from heat?
- What is the proper course of action when a published paper utilizes my previously published methodology without providing citation?
- How to deter wasps from an untreated larch fence
- Why aren't there baleen whales at about the size of a dolphin?
- How to do non-greedy multiline capture with recent versions of pcre2grep?
- Is there a name for the beat in drum and bass that is a distillation of the amen break
- Not being introduced to the team – should I ask for it?
- Existence of Jordan curves between a compact and an open set
- Hypothetical copyleft exposure developer on proprietary project, legal?
- How to extend an MDF shelf?
- What is the outcome when an officer's statement under oath contradicts video evidence
- Seeking advice for a 20 hours layover in Istanbul (IST) airport
- If a mathematical theorem is true, what it is true of?
- How can one circumvent the "\unexpanded" condition imposed by LaTeX3 clist module?
- Self explanatory
- wifi problem with regulatory domain settings
- How should one pronounce plural French-derived German words?
- The puzzle of chess pieces beating one another in “rock—paper—scissors” way
- What is the parity of a neutrino?
- “Unclear step in a math book for entertainment”
- rock paper scissors game with randomized system choices. NOT using rnd()
- Civilian airplanes with inside fuselage jet engines
- Sum of even powers of spin operators