A similar trick (point at infinity or ideal point) is used in projective geometry to distinguish between directions (vectors) and places (points) by using coordinates only: https://en.wikipedia.org/wiki/Projective_geometry
But if you actually want to do calculations with infinities and infinitesimals the surreal numbers might be better suited for that: https://en.wikipedia.org/wiki/Surreal_number