def _cosFaceAngle(x1: float, x2: float, x3: float) -> float:
    """Computes the cosine of the face angle for a triple of hyperbolic circles. 
    
    Args:
        x1: The radius of the circle at which to compute the cosine face angle. 
        x2: The second circle's radius. 
        x3: The third circle's radius. 
    
    Returns:
        The cosine of the face angle at x1. 
    """
    if x1 <= 0: # x1 is a horocycle
        return 1.0
    elif x2 <= 0 and x3 <= 0: # both neighbors are horocycles
        return (2.0 * x1 - 1.0)
    elif x2 <= 0: # Only x2 is a horocycle
        x = x3 - x1 * x3
        return ((x1 - x) / (x1 + x))
    elif x3 <= 0: # Only x3 is a horocycle
        x = x2 - x1 * x2
        return ((x1 - x) / (x1 + x))
    else:
        ans = (x1 * (x1 + (1.0 - x1) * (x2 + x3 - x2 * x3)) 
                  / ((x1 + x3 - x1 * x3) * (x1 + x2 - x1 * x2)))
        ans = 2.0 * ans - 1.0
        if ans > 1.0:
            return 1.0
        elif ans < -1.0:
            return -1.0
        else: 
            return ans