def calc_pct_of_absolute(values, epsilon=1000000.0):
    """calculates value / sum of abs values, adds epsilon if sum of abs values is zero"""
    denominator = values.abs().sum()
    if denominator == 0:
        denominator = epsilon
    return values / denominator
