from typing import Union


def is_close(
    actual: Union[int, float], expected: Union[int, float], threshold: Union[int, float]
) -> bool:
    """Compare the difference between two input numbers with specified threshold."""
    return abs(round(actual, 2) - round(expected, 2)) <= threshold