import math


def haversine(x):
    """
    Computes the haversine formula

    Parameters
    ----------
    x    : angle in radians

    Returns
    -------
         : square of sine of half the radian (the haversine formula)

    Example
    -------
    >>> haversine(math.pi)     # is 180 in radians, hence sin of 90 = 1
    1.0

    """

    x = math.sin(x/2)
    return x*x