by sega_sai · 3y ago · 0 comments
Although because pi is a transcendental number maybe it is impossible to have an algorithm to return the n-th digit in O(1) operations? Does anyone know ?
Upd: thinking more about it, just to read all the digits of number n, one needs log(n) operations, so I guess anything that has performance of O(log(n)) can be considered easy (i.e. the digits of rational numbers can be computed in O(logn).
[1] https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...
There are transcendental numbers where the n-th digit can be computed in O(log n) like Champerowne constant though.
cmeacham98's constant: a number where the `n`th digit is the `2^n`th digit of pi