def positive(x):
    """
    Some values may go negative due to rounding errors or
    other reasons. This function will return zero for 
    any negative value.
    """
    if x >=0:
        return x
    else:
        return 0