$ \left\lfloor 10^{\lfloor n \rfloor} \pi \bmod 10 \right\rfloor $ - does this function give the nth decimal place of pi?

Your function is mathematically correct, but not computerically correct. $64$ bit floating point numbers have about $16$ decimal digits of precision. You don't need the floor on $n$, but you are trying to extract decimal digits that are not there.