46
4
Definitions
- An algebraic number is a number that is a zero of a non-zero polynomial with integer coefficients. For example, the square root of
2
is algebraic, because it is a zero ofx^2 - 2
. - A transcendental number is a real number which is not algebraic.
Task
You are to choose a transcendental number.
Then, write a program/function that takes a positive integer n
and output the n
-th decimal digit after the decimal point of your chosen transcendental number. You must state clearly in your submission, which transcendental number is used.
You can use 0-indexing or 1-indexing.
Example
e^2=7.389056098...
is a transcendental number. For this number:
n output
1 3
2 8
3 9
4 0
5 5
6 6
7 0
8 9
9 8
...
Note that the initial 7
is ignored.
As I mentioned above, you can choose other transcendental numbers.
Scoring
This is code-golf. Lowest score in bytes wins.
How do the different answers handle the fact that there is a finite number of integers that can be used as an argument? 0 would be an acceptable answer since a transcendental number exists whose first maxInteger digits are 0 – WNG – 2017-05-16T18:45:23.433
1@WNG Languages have arbitrary precision. There is no maxinteger. – Leaky Nun – 2017-05-16T18:45:58.987
1@WNG You can think of the input index as a string, not an integer, in languages that don't have arbitrarily large number types. – isaacg – 2017-05-18T00:25:27.160