def absolute_error(x0, x):
    """
    Compute absolute error between a value `x` and its expected value `x0`.

    :param x0: Expected value.
    :param x: Actual value.
    :return: Absolute error between the actual and expected value.
    :rtype: float
    """
    return abs(x0 - x)