}
if (Math.abs(y1)<=LEPS && Math.abs(y2)<=LEPS) {
return Math.abs(x1-x2) * getSemiMajorAxis(); // Points are on the equator.
}
// Other cases: no solution for this algorithm.
final CoordinateFormat format = new CoordinateFormat();
throw new ArithmeticException(Errors.format(ErrorKeys.NO_CONVERGENCE_$2,
format.format(new GeneralDirectPosition(Math.toDegrees(x1),Math.toDegrees(y1))),
format.format(new GeneralDirectPosition(Math.toDegrees(x2),Math.toDegrees(y2)))));
}