def error(p:float, p_star:float) -> tuple:
    """
    Compute the absolute error and
    relative error in approximations
    of p by p^\\star.
    ----------------------------

    Args:
        p, p_star: Float.

    Returns:
        (absolute error, relative error).

    Raises:
        None.
    """
    absolute_error = abs(p - p_star)
    relative_error = absolute_error / p
    return (absolute_error, relative_error)