No.10408611 ViewReplyOriginalReport
int function(int n, float m){
if((n % 10) == (int)m){
return n;
} else {
n *= |(n % 10) - (int)m|;
m *= 10;
m %= 10;

return function(n, m);
}
}

Assume this function were graphed as y = f(x, pi), with an arbitrary amount of precision for pi.

If the last digit of x is not equal to the first digit of pi, such as...

> (9054 % 10) ?= (int)3.1415...
> 4 != 3

Then the function is called again, however x is multiplied by the difference between them, and pi is "shifted" over a digit:

>3.1415... * 10 = 31.415...
>31.415... % 10 = 1.415...

So, for f(2, pi), for instance, it would call the following recursively:

> f(2, 3.1415...)
> f(2, 1.415...)
> f(2, 4.15...)
> f(4, 1.5...)

And so on, until n == m. My question is: is this guaranteed to happen eventually in light of the irrationality of pi? Would it be possible for this function to loop recursively forever?