g | x | w | all
Bytes Lang Time Link
692Bespoke250827T013546ZJosiah W
005Uiua250827T034316Znyxbird
009Thunno 2230817T083625ZThe Thon
016Julia 1.0221219T170145ZMarcMush
099C gcc221219T155716Zl4m2
660Brainfuck 32 bit190412T152722Zorthople
016Perl 6190412T172812Zbb94
004Japt170918T092716ZShaggy
007TIBASIC190412T161344Zabsolute
014PHP180424T194644ZFrancisc
016><>180423T230643ZJo King
865RPL HP48171112T113019ZHeimdall
007MY170915T204031ZAdalynn
040Perl 5170920T122314Zprimo
016Octave170917T105900ZSanchise
008MATL170917T162901ZB. Mehta
006APL170917T213644ZUriel
130Desmos170915T052452ZATaco
005Neim170916T141518ZOkx
005CJam170917T055124ZDennis
269ForceLang170916T204942ZSuperJed
015Haskell170916T092353Zjferard
018Mathematica170915T224539ZZaMoC
006Jelly170915T210006ZAdalynn
01105AB1E170915T200848ZMagic Oc
016Excel VBA170915T204436ZTaylor R
016Ruby170915T193248ZSnack
009Pyth170915T165039ZMr. Xcod
016Javascript170915T163144ZEndenite
017Math.JS170915T062717ZATaco
007SOGL V0.12170915T052930Zdzaima
015VBA Excel170915T040857Zremoel
006Jelly170915T040253ZJonathan
008Charcoal170915T042031ZASCII-on
016J170915T041726ZConor O&
064Python 3170915T041000ZLeaky Nu
009Jelly170915T033909Zfireflam

Bespoke, 1109 692 bytes

-417 bytes by changing from a spigot algorithm by Jeremy Gibbons to an efficient infinite series.

PUSH TRI OUTPUT N
PUT XX:FOUR SEXTET;OUTPUT CH
PUSH I
PUSH I
PUSH I
PUSH I
PUSH I
PUSH I
CONTROL DOWHILE
PUSH FOUR DO COPYN
STACKTOP PRODUCTOF
PUSH TRI DO COPYN
PUSH TRI DO COPYN
STACKTOP PRODUCTOF
STACKTOP PLUS
PUSH SEXTET DO ROT
PUSH TRI DO COPYN
STACKTOP PRODUCTOF
PUSH FIFTH DO ROT
PUSH TRI DO COPYN
STACKTOP PRODUCTOF
PUSH FOUR DO ROT
PUSH TRI DO COPYN
STACKTOP PRODUCTOF
PUSH TRI DO ROT
STACKTOP PLUSONE
DO SWITCH
PUSH BI STACKTOP PLUS
DO TURNOVER
PUSH FIFTH DO COPYN
PUT XXXX:BI TRI I TRI;STACKTOP LT
CONTROL END
DO COPY STACKTOP PLUS
PUSH BI DO COPYN
STACKTOP MODULO
PUT XX:I NUMBERZERO
PUT XXX:SEXTET DIGITNINE I;STACKTOP POW
STACKTOP PRODUCTOF
DO SWITCH
STACKTOP QUOTIENTOF
OUTPUT N

Outputs 692 digits of pi with an American decimal separator (.).

Here are the steps this program takes:

It takes a while to finish, but it's not too bad. At least it finishes within the age of the universe, unlike this alternate solution...

Alternate solution, 692 542 bytes

-150 bytes by multiplying by a power of 10 before dividing and printing, instead of looping through digits one by one.

???
PUSH I
PUSH I
PUSH I
CONTROL DOWHILE
PUSH TRI DO COPYN
PUSH BI STACKTOP POW
PUSH FOUR STACKTOP PRODUCTOF
DO COPY
STACKTOP MINUSONE
PUSH TRI DO ROT
STACKTOP PRODUCTOF
PUSH TRI DO ROT
STACKTOP PRODUCTOF
PUSH TRI DO SWITCHN
STACKTOP PLUSONE
DO COPY
PUSH FOUR DO ROT
PUT XXXX:I I I I
DO COPY
STACKTOP POW
STACKTOP LT
CONTROL END
DO COPY
STACKTOP PLUS
PUSH TRI OUTPUT N
PUT XX:FOUR SEXTET;OUTPUT CH
PUSH BI DO COPYN
STACKTOP MODULO
PUT XX:I NUMBERZERO
PUT XXX:FIFTH FOUR I;STACKTOP POW
STACKTOP PRODUCTOF
DO SWITCH
STACKTOP QUOTIENTOF
OUTPUT N

Outputs 542 digits of pi with an American decimal separator (.).

This program calculates \$1111^{1111} - 1\$ iterations of the Wallis product, unconditionally outputs 3., and outputs the result of \$10^{541} \times \frac{(n \% d)}{d}\$ (where \$n\$ is the numerator and \$d\$ is the denominator). I'm pretty sure all displayed digits should be accurate, but I literally don't have the time to run it so I can check.

Uiua, 5 bytes

⁅₄÷₂τ

Try it!
÷₂ half τ tau ⁅ rounded to ₄ four decimal places.

6 bytes w/o τ

⁅₅∠0¯1

Try it!
∠ arctangent of 0 and ¯1 ⁅ rounded to ₅ five decimal places.

Thunno 2, 9 bytes

»Øȯ\œ»k6/

Try it online!

Compressed integer 314159265 divided by 100000000.

Thunno 2, 4 bytes

kP5ɱ

Try it online!

Using built-in Pi constant.

Julia 1.0, 16 bytes

show(acos(-1))##

Try it online!

This is the default precision printed, I sadly have to add 2 dummy characters but I don't think it's possible to make it shorter

C (gcc), 99 bytes

i;main(){for(;i<46;)printf(i++?"%02d":"3.",i[L"0;5:a]î.+& O2TÅ©']KiR J^-\N¤>cV0ý*uO"]);}

Try it online!

Hardcode 99 bottle of digits

Brainfuck (32 bit), 672 660 bytes

++++++[->++++++++++<]>[->+++++++++++<]>[<+>>>>>>>>++++++++++<<<<<<<-]>+++++[<+++++++++>-]+>>>>>>+[<<+++[>>[-<]<[>]<-]>>[>+>]<[<]>]>[[->>>>+<<<<]>>>+++>-]<[<<<<]<<<<<<<<+[->>>>>>>>>>>>[<+[->>>>+<<<<]>>>>>]<<<<[>>>>>[<<<<+>>>>-]<<<<<-[<<++++++++++>>-]>>>[<<[<+<<+>>>-]<[>+<-]<++<<+>>>>>>-]<<[-]<<-<[->>+<-[>>>]>[[<+>-]>+>>]<<<<<]>[-]>+<<<-[>>+<<-]<]<<<<+>>>>>>>>[-]>[<<<+>>>-]<<++++++++++<[->>+<-[>>>]>[[<+>-]>+>>]<<<<<]>[-]>+>[<<+<+>>>-]<<<<+<+>>[-[-[-[-[-[-[-[-[-<->[-<+<->>]]]]]]]]]]<[+++++[<<<++++++++<++++++++>>>>-]<<<<+<->>>>[>+<<<+++++++++<->>>-]<<<<<[>>+<<-]+<[->-<]>[>>.<<<<[+.[-]]>>-]>[>>.<<-]>[-]>[-]>>>[>>[<<<<<<<<+>>>>>>>>-]<<-]]>>[-]<<<[-]<<<<<<<<]

All credit should go to Felix Nawothnig's yapi.b.

Should you decide to downvote, please leave a comment explaining why.

Perl 6, 16 bytes

{4*atan       1}

Try it online!

Japt, 9 4 bytes

As short as it can allowably get :)

Includes an unprintable (reverse line feed, charcode 141) after the #.

3.#

Test it

In Japt, any character following # is converted to its character code and appended to any digits or decimal points which may precede it, in this case the 3.

TI-BASIC, 7 bytes

round(4tan⁻¹(1),6

round(2sin⁻¹(1),6

round(cos⁻¹(-1),6

These three statements will print 3.141593.


Note: TI-BASIC is a tokenized language. Character count does not equal byte count.

PHP, 14 Bytes

Try it online!

<?=acos(-001);

A bit tricky, but the precition of M_PI is 3.1415926535898

><>, 16 bytes

"]a:5;."3no>n<

Try it online!

There's a couple of unprintables in there, with the first having value 26 and the second 141.

RPL (HP48), 86.5 bytes, 87 digits [Does this count?]

« GROB 8 43
14159265358979323846264338327950288419716939937510582097494459230781640628620899862803
→STR 9 OVER SIZE SUB 2 "." REPL »

GROB is an image keyword. The 2 numbers that follow are width and height. The hexadecimal digits that follow are bitmap. That's 1 byte of storage for every 2 digits plus the image metadata.

Empty program « » takes 10 bytes. A command takes 2.5 bytes. A float takes 10.5 bytes, but if it's equal to a single digit integer, it can take 2.5 bytes.

HP48 stores 4 rather than 8 bits at each memory location, so a byte occupies 2 consecutive locations (low endian). Often 20-bit chunks are used, and they do take 2.5 bytes (not 3).

MY, 7 bytes

’2ō"8↑↵

Try it online!

How?

Perl 5, 40 bytes

}{$\=$\/~(2*$_)*~$_+2for-130..-2

Requires the command line option -pMbignum, counted as 8.

Sample Useage:

$ perl -pMbignum test.pl < /dev/null
3.141592653589793238462643383279502884197

I apologize for no TIO link, it doesn't seem to support bignum (or an unmatched opening brace...).

Octave, 16 bytes

vpa(acos(-1),16)

Try it online!

I'm having a hard time imagining how this could be shorter...

MATL, 9 8 bytes

-1X;V9:)

Try it online!

Explanation:

-1      % number literal
X;      % inverse cosine (radians), giving pi
V       % convert to string
9       % specify precision
:)      % keep first 9 characters - 8 digits of precision

Saved one byte thanks to Luis Mendo!

APL, 6 bytes

10○⍟-1

Takes the imaginary part of ln(-1).

Try it online!

Desmos, 130 bytes

f\left(\right)=\frac{\operatorname{floor}\left(10^{128}\cdot 4\sum_{k=1}^{9^9}\frac{\left(-1\right)^{k+1}}{2k-1}\right)}{10^{128}}

The source code for this (Which can be accessed by copy and pasting inside and outside of Desmos) isn't optimal when generated using the Desmos editor, so a few bytes of whitespace were golfed down where possible.

This defines a function f which takes no arguments returns pi, calculated using the Gregory Sequence to k=9^9 (I can't confirm this is accurate enough, however I am of the believe that it is, it can be made more accurate with a greater value of k) it then floors the result to 128 decimal places, which, alongside the 3., is the length of the source code.

Try it online!

Neim, 5 bytes

3FBρσ

Explanation:

3      Push 3
 FB    F pushes 45, B converts it into a character code, '.'
   ρ   Push 14
    σ  Push 15
Implicitly concatenate and print stack

Try it online!

CJam, 5 bytes

3.14F

Try it online!

How it works

3.14   e# Push 3.14.
    F  e# Push 15.

ForceLang, 269 bytes

set S 0x5F258E476FC1B3B5571012206C637089460E41E814CB071E61431B5F0671F551D18D2C5D2D3A2565E408C6DE8D753F595B6E9979C3866D1C9965008DCFB02E3BD11D21DFFAF17978F05C8BBACF55A5ED5E90B1D8CAD8736AA4B728EB342B453F86353DB371D322B6A98613BC5CCB00AC2.mult 1e-270
io.write S.toString 268

Haskell, 15 bytes

 acos(-1)-3e-15

Try it online!

Using @JungHwanMin formula.

Mathematica, 18 bytes

using zeta function

enter image description here

Sqrt[6Zeta@2]~N~18

Try it online!

Jelly, 6 bytes

-ÆAær5

Try it online!

Uses a different approach than the other Jelly answers.

How?

-ÆA is inverse cosine of -1 (which is pi), ær5 retrieves the needed section. It worked out so rounding is equivalent to truncation in this case

05AB1E, 11 bytes

3•∊&SK•)'.ý

Try it online!

COMMAND     # CURRENT STACK         | EXPLANATION
------------#-----------------------+-----------------------------------
3           # [3]                   | Push 3.
 •∊&SK•     # [3, 1415926535]       | Push compressed base-255 number 1415926535.
       )    # [[3,1415926535]]      | Wrap the 2 to an array.
        '.  # [[3,1415926535],'.']  | Push a decimal point.
          ý # ['3.1415926535']      | Join 3 and 1415926535 with a decimal point.

USING BUILT-INS:

05AB1E, 4 bytes

žq5£

Try it online!


3žs doesn't work for some reason...

Excel VBA, 16 Bytes

Anonymous VBE immediate window functions that takes no input and output to any of Excel VBA's STDOUTs

Each line represents a separate function that returns Pi of length 16

?Mid(4*Atn(1),1)
?Str([Acos(-1)])
Debug.?4*Atn(1);
MsgBox[Acos(-1)]
[A1]="=ACOS(-1)"

Ruby, 16 bytes

->{Math.acos -1}

Try it online!

Pyth, 9 bytes

<`.ttZ4 T

Try it here.

Works with the fact that .

Javascript, 16 bytes

_=>Math.acos(-1)

f=
_=>Math.acos(-1)
console.log(f())

Math.JS, 17 bytes.

     log(-1,e).im

That's 5 leading spaces

This calculates to 15 decimal places, and implicitly prints it.

Try It Online!

SOGL V0.12, 10 9 7 bytes

4ΘΞ“6⌡υ

Try it Here!

Explanation:

4ΘΞ“     push 31415
    6⌡   6 times do
      υ    divide by 10

VBA (Excel), 15 bytes

MsgBox 4*Atn(1)

Output: 3.14159265358979

I think this is not acceptable as I golfed it just to fit the length of the PI. The un-golfed length of it is 17 bytes. D:

Jelly, 6 bytes

3;⁽4ƒṾ

Try it online!

Prints 3,14159 with the allowed "European" decimal separator, ,.

How?

3;⁽4ƒṾ - Main link: no arguments
3      - literal 3                3
  ⁽4ƒ  - base 250 literal 14159   14159
 ;     - concatenate              [3,14159]
     Ṿ - unevaluate               ['3', ',', '1', '4', '1', '5', '9']
       - implicit print           3,14159

Charcoal, 8 bytes

”i‴Aχ:&”

Try it online!

Just a compressed string.

J, 16 bytes

17j15":4*_3 o.1:

Try it online!

Similar to the VBA answer. Outputs: 3.141592653589793.

Python 3, 64 bytes

print("3.%d"%int("SIXW57LUPVBUA10HBQJOL57QLF54UT0U00KIN32O",36))

Try it online!

Jelly, 9 bytes

“Œı⁸Ç’÷ȷ8

Try it online!

Outputs 3.14159265

How it Works

“Œı⁸Ç’     - The integer 314159265
      ÷    - divide
       ȷ8  - The integer 100000000