Without using numbers, Calculate Pi

-4

Inspired by Nicola Sap's Challenge

Goal

Your challenge is to simply produce π with 232-1 digits. However today's twist, like the title implies, is to produce it without using any numbers or any π constants in your source-code.

Input/Output

Your program will not be provided usable input. It can output in any reasonable format.

Rules

  • Standard Loop-Holes forbidden
  • You cannot use numbers in your source code nor can you use a pi constant if it exists. If your language also has tau defined as 2pi, that's also banned. Numbers are in the range [0-9]
  • You must output as many digits as you can You must output 2^32-1 digits of pi, including the 3. (This has been changed due to the arbitrary nature of the original task)
  • Your Program must terminate, or at least theoretically terminate given enough time. Crashing is an acceptable way to terminate.

Scoring

This is code golf so shortest answer wins.

A Million Digits of Pi for your use

Veskah

Posted 2018-09-15T01:19:24.623

Reputation: 3 580

Question was closed 2018-09-15T21:55:40.433

2Just acknowledging that it's been done to death doesn't mean that you're not killing it more. – Jo King – 2018-09-15T01:25:56.413

2How do you define numbers? – Jo King – 2018-09-15T01:29:35.840

@JoKing It might prove to be a fresh enough spin to be interesting. If not, so it goes. Besides, if I didn't say it, someone else would've. Also added – Veskah – 2018-09-15T01:31:06.287

3Given that there are algorithms for computing pi to an arbitrary precision I think there need to be some more limits imposed on the problem. Otherwise the winner is just whoever uses the largest target precision. Working around the no-numbers restriction just requires casting char to int – SamYonnou – 2018-09-15T01:32:24.147

@user202729 Yeah, I overlooked that aspect. I guess to salvage this, the goal shall be changed to generating 2^32-1 digits – Veskah – 2018-09-15T02:09:00.830

2It's unfortunate that Shakespeare doesn't have arbitrary precision, or else the Shakespeare Programming Language would be a shoo-in. – JosiahRyanW – 2018-09-15T03:18:35.490

@JosiahRyanW I guess implementing arbitrary precision in SPL is not very hard. But how is that related? – user202729 – 2018-09-15T13:01:23.700

@user202729 Shakespeare doesn't have numbers in its source code anyways. – JosiahRyanW – 2018-09-15T21:31:24.880

Answers

3

Perl 6, 67 bytes

{$!=.FatRat²/$!+$_+$_-?e}for ²…¹;say substr ⁴/$!,^²³²

Try it online!

Takes a very long time to compute. As an example here's an altered version that only prints the first 1000 digits.

Jo King

Posted 2018-09-15T01:19:24.623

Reputation: 38 234

Can you not remove the braces? – H.PWiz – 2018-09-15T19:47:46.723

1

Mathematica, 42 39 bytes

N[Log[-(d=I/I)]/I,((c=d+d)^c^c^c)^c-d]&

Output Returns exactly 4294967295 digits as requested.

If more digits were allowed, then by outputting 7.76e17 digits (if even possible lol), 26 bytes would be possible:

N[Log[-E/E]/I,E^(E^E*E)]&

Sorry but Pi = Ln(-1)/i.

Shieru Asakoto

Posted 2018-09-15T01:19:24.623

Reputation: 4 445

The OP has changed the challenge to produce 2^32-1 digits of Pi – Jo King – 2018-09-15T02:36:06.557

@JoKing You mean 2147483647 digits exactly? – Shieru Asakoto – 2018-09-15T02:38:57.647

14,294,967,295 actually. – Veskah – 2018-09-15T02:45:22.543

@Veskah I though it was 2^(32-1)-1 lol – Shieru Asakoto – 2018-09-15T02:50:10.027

1

GolfScript, 70 85 bytes

;''!..):t{](..+.*:a@~@*\a(*@)\@}t.+.+t+:T t..*.*t*?(:b?*@;\{.@[\].~/\~%T*@}b*;;]("."@

+15 bytes because I can't read.

Try it online!

Or, actually, don't. Try this online instead, which calculates 4 digits.

JosiahRyanW

Posted 2018-09-15T01:19:24.623

Reputation: 2 600