Function to round the nth decimal place of pi to the nearest integer. For example, for pi, n = 0, y = 3. n = 1, y = 1. n = 2, y = 4. And so on and so forth.
Gives me good results until n = 17, which yields 8 instead of the expected 3. Then it's unfortunately kind of all over the place. It only gives me even numbers?
Is my function correct, or is this a Desmos error?
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.