def parabolic_percent_absorption_at_time(time, absorption_time):
    """
    Find percent of absorbed carbs using a parabolic model

    Parameters:
    time -- relative time after eating (in minutes)
    absorption_time --  time for carbs to completely absorb (in minutes)

    Output:
    Percent of absorbed carbs
    """
    if time < 0:
        return 0
    if time <= absorption_time / 2:
        return 2 / pow(absorption_time, 2) * pow(time, 2)
    if time < absorption_time:
        return -1 + 4 / absorption_time * (time - pow(time, 2) / (2 *
            absorption_time))
    return 1
