9

2

Your challenge is to print `x`

digits of pi where `x`

is your code length.

Examples:

```
Source code (length) -> output
foo! (4) 3.141
foobar (6) 3.14159
kinda long (10) 3.141592653
+++++ (5) 3.1415
123456789 (9) 3.14159265
```

You can use `floor(π/10 * 10`

to determine the number of digits you need to print. Note that the decimal point does not count as a digit of pi - so code of length 3 should have output ^{code_length}) / 10^{code_length - 1}`3.14`

, of length 4.

Rules:

- Your code length must be larger than three characters.
- You may not use any standard loopholes.
- You may use any standard allowed output methods.
- You may not read your source to determine code length.
**You may not use a builtin pi constant.**- Pi must be
*completely accurate*and not approximated. - The decimal point in the output is necessary. If you choose to output via return value, you must return a floating point integer.
- The goal of this challenge is to find the shortest solution in each language, not the shortest language for the solution. Don't be afraid to post a solution in a language when a shorter solution is posted in the same language as long as your solution uses a different method.

...so would this be valid or not?

– Jonathan Allan – 2017-09-15T16:59:11.143(edit ^ this even (rounding))

– Jonathan Allan – 2017-09-15T17:07:04.200“Code length” ← in bytes or in characters? – Lynn – 2017-09-17T21:19:27.830

@Lynn Bytes, as usual. – MD XF – 2017-09-17T23:50:20.990

Is just

`3`

allowed? – NoOneIsHere – 2018-04-23T21:47:03.163@NoOneIsHere

Your code length must be larger than three characters.– Jo King – 2018-04-23T22:51:56.587