-4
\$\begingroup\$

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

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Just acknowledging that it's been done to death doesn't mean that you're not killing it more. \$\endgroup\$
    – Jo King
    Commented Sep 15, 2018 at 1:25
  • 2
    \$\begingroup\$ How do you define numbers? \$\endgroup\$
    – Jo King
    Commented Sep 15, 2018 at 1:29
  • \$\begingroup\$ @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 \$\endgroup\$
    – Veskah
    Commented Sep 15, 2018 at 1:31
  • 3
    \$\begingroup\$ Given 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 \$\endgroup\$
    – SamYonnou
    Commented Sep 15, 2018 at 1:32
  • 2
    \$\begingroup\$ It's unfortunate that Shakespeare doesn't have arbitrary precision, or else the Shakespeare Programming Language would be a shoo-in. \$\endgroup\$ Commented Sep 15, 2018 at 3:18

3 Answers 3

3
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ Can you not remove the braces? \$\endgroup\$
    – H.PWiz
    Commented Sep 15, 2018 at 19:47
1
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ The OP has changed the challenge to produce 2^32-1 digits of Pi \$\endgroup\$
    – Jo King
    Commented Sep 15, 2018 at 2:36
  • \$\begingroup\$ @JoKing You mean 2147483647 digits exactly? \$\endgroup\$ Commented Sep 15, 2018 at 2:38
  • 1
    \$\begingroup\$ 4,294,967,295 actually. \$\endgroup\$
    – Veskah
    Commented Sep 15, 2018 at 2:45
  • \$\begingroup\$ @Veskah I though it was 2^(32-1)-1 lol \$\endgroup\$ Commented Sep 15, 2018 at 2:50
1
\$\begingroup\$

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.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.