Apologies if this is better asked on StackOverflow, but I thought the community here would be more likely to have an answer, even though it's related to coding.
I'm coding up a little library for experimenting with the inversive geometry of the sphere. A point on the sphere is represented by $(x, y, z)$ where $\sqrt{x^2 + y^2 + z^2} = 1$. I want to apply Möbius transformations to sets of points on the sphere. Obviously, I could accomplish this by first applying a stereographic projection of each point $(x, y, z)$ to a point $z$ in the complex plane, applying a Möbius transformation $z \mapsto \frac{az + b}{cz + d}$ to each point, and then projecting back onto the sphere.
The problem with this approach, is that because I'm using double precision floating point numbers for the coordinates, points that are near the South pole of the sphere will have large precision errors on projection (since they are "near" infinity), whereas points near the equator will experience a lot less of a precision issue.
So I'm wondering if there is a more natural method for applying Möbius transformations directly to the points $(x, y, z)$ rather than composing with stereographic projections?