def discount_cost(raw_cost, discount_rate, t_into_future):
    """
    Calculate the discounted cost associated with the raw cost at time (t + t_into_future)

    Args:
        raw_cost: Cost without accounting for discounting
        discount_rate: Discounting rate per year
        t_into_future: Number of years into future at which we want to calculate the discounted cost
    Returns:
        The discounted cost
    """

    assert t_into_future >= 0., 't_into_future must be non-negative'
    return raw_cost / ((1. + discount_rate) ** t_into_future)