It's a programming task, but I'd like to know if there is a way to solve it mathematically.
I need to check $(...((a - b) \cdot y - b) \cdot y \ldots) \cdot y \geq 0$ if we subtract $b$ and multiply on $y$, $n$ times.
I tried to represent it as
$$a \cdot y^n \geq b \cdot \frac{y^n - 1}{y - 1},$$
but I would like to get rid of big numbers such as $y^n$, because these are incomparable in terms of programming if $n \leq 1 \times 10^{18}$ and $y \leq 1 \times 10^{2}$. Do you have any idea how can it be represented differently?
Your correct expression is $ay^n \ge by\frac {y^{n}-1}{y-1}$ because the first term of the geometric series is $by$ and the common ratio is $y$. Now if $n$ is large and $y \gt 1$, $y^n$ will be huge, so we should divide it out and get $$a \ge by\frac {1-y^{-n}}{y-1}$$
If you ignore $y^{-n}$ because it is so small compared to $1$, you get $$a \ge by\frac {1}{y-1}$$ which has no especially large terms.