Limits and While Loops 
Question: Consider the following program. Does $f(1)=\infty$? 
\begin{align*}
f(i):=&|\text{while } \frac{1}{i}>0\\
&||i\leftarrow i+1\\
&|i
\end{align*}

I would say that $f(1)=\infty$ is a true statement. The program does not terminate, but one could consider the sequence of points $\{x_i\}_{i\in \mathbb{N}}$ given by $x_i:=\frac{1}{i}$, so that  $\{x_i\}_{i\in \mathbb{N}}$ converges to the limit $0$ which makes $\underbrace{\frac{1}{i}}_{=0}>0$ false which means $f(1)=\infty$. However, I could be wrong.
 A: The only thing we can say here is that $f(1)$ is not defined, or that the program does not terminate for the input $1$.
We cannot say that $f(1)=0$.
A: It's a bit of a funny question. Looks like the best answer is "no." The number $1$ is not in the domain of $f$, because the program doesn't terminate. 
It's true that as a human we can see that the in-memory value of $1/i$ is headed toward $0$, but $f$ was never going to return $1/i$, it was going to return $i$, which is headed off to $\infty$. Even if it were going to return $1/i$, the answer still shouldn't be $0$, because the program doesn't terminate and there's no notion of a limiting operation made explicit here.
A: The final result of the function would depend on the method of division you'd end up using, at least if this function is executed by a computer.
One thing we can be sure of, however, is that the result of f(1) will under no circumstance be 0.
After all, the input of the function is 1 and the loops keeps increasing the value of i.
For example, if the function is executed using integer division, (1 / 2) > 0 would be false, and the function would end up yielding a result.
However, the result would be 2, not 0.
Therefore, the function either runs out of resources, or returns something larger than 0 - but never 0.

Although I'm answering this question as a programmer, rather than as mathematician, the logic remains true whether it be mathematical or programmatic: Even if we assume the loop can run to infinity, and we assume 1 divided by infinity as greater than 0, the function would produce infinity, not 0.
Pure logic dictates that f(1) != 0, whichever notation is preferred :)

Since I'm writing this as a programmer on the internet anyway, I might as well provide proof along with this answer.
I wrote the following snippet:
<?php

function f($i) {
    while ((1 / $i) > 0) {
        $i = increase($i);
    }
    return $i;
}

function increase($n) {
    if ($n < 100) {
        return $n + 1;
    }
    return INF;
}

(I would have used if ($n < INT_MAX) but that results in a 3+ seconds runtime)
Long story short, assert(f(1) === INF); passes, and
dump(f(1));

Is indeed float(INF).
Run this code
A: The function is undefined at $i=1$ since $\not \exists b$ such that $b=f(1)$.
For a formal proof, indicating with $i_k$ the value assumed by $i$ at the $k^{th}$ loop, we can show by induction that $\forall k$


*

*$i_k\ge 1 \implies \frac 1{i_k}>0$
therefore the loop will never end.
More in general $f(i)$ is undefined for any $i>0$ and $f(i)=i$ for any $i< 0$.
For $i=0$ it depends on how the "while" command returns to the operation $1/0$.
