def erd(active, rest):
    """The event-related de/sync formula. Output is in percents.

    If result is < 0, than what we have is ERD. Positive numbers denote ERS.
    """
    return ((active-rest)/rest)*100