def haversine(x):
    """Return the haversine of an angle

    haversine(x) = sin(x/2)**2, where x is an angle in radians
    """
    y = .5*x
    y = np.sin(y)
    return y*y
Return the haversine of an angle

    haversine(x) = sin(x/2)**2, where x is an angle in radians