Odd edge cases are the default state of reality for geospatial unless you are extremely careful. Even if you are diligent and assume a global high-precision ellipsoid as your Earth model, you still have to ensure that the computational geometry is correct in that context for every possible use case. Operations on real surfaces are difficult to implement on discrete computers.
As a simple example, correct ellipsoid computation in double precision sometimes can't even be computed in quad precision, never mind double, yet most efforts at computational geometry limit themselves to double precision because that is what computers support natively. Manipulating relationships in real-world coordinate systems is not for amateurs.