An even more honest thing to say is that infinity when used as a number is a hack introduced by mathematicians to make notation and reasoning simple in some cases, but that it can be dangerous in other cases, like any other hack. If you want to use infinity in a safe way, then use limits around your expressions.
(And this quickly resolves the case of this article, since lim x->inf x-2*floor(x/2) does not exist).
It's not a hack to create a new set and work out rules for how to use it which are both internally consistent and support easy morphisms with more familiar sets.
It may not be easy, but it's hardly a hack. It's one of the big ways math works, really. Are negative numbers a hack? Rational numbers? Algebraic numbers? Well then neither is the two-point compactification of the reals or extending the natural numbers into the ordinal numbers.
These are things with very precise models and interpretations. No hacks at all.
That's true in calculus, and probably a lot of other applied mathematics contexts where rigor tends to get swept under the rug, but it's not completely fair since there are versions of "infinity" that are defined and used rigorously. (The transfinite ordinals and cardinals mentioned in the Stack Overflow article are the example I'm familiar with.)
(And this quickly resolves the case of this article, since lim x->inf x-2*floor(x/2) does not exist).