def METHOD_NAME(temp_c, hum):
    """
    Calculate dewpoint
    :param temp_c: Temperature in Celsius
    :param hum: Relative humidity
    :return:
    """
    if None in [temp_c, hum]:
        return
    dict_tn = dict(water=243.12, ice=272.62)
    dict_m = dict(water=17.62, ice=22.46)
    if temp_c >= 0:
        t_range = 'water'
    else:
        t_range = 'ice'
    tn, m = dict_tn[t_range], dict_m[t_range]
    if hum / 100.0 <= 0:
        # Cannot perform log on 0 or negative number
        return 0.0
    else:
        return float(
            tn * (math.log(hum / 100.0) + (m * temp_c) / (tn + temp_c)) / (m - math.log(hum / 100.0) - m * temp_c / (tn + temp_c)))