def elementwise_residual(true_val, pred_val):
    """The residual between a single true and predicted value.

    Parameters
    ----------
    true_val : float
        True value.
    pred_val : float
        Predicted value.

    Returns
    -------
    residual : float
        The residual, true minus predicted
    """
    return true_val - pred_val