from typing import Union


def generate_ordinal(number: Union[float, int]) -> str:
    """Generate ordinal representation of a number."""
    _number = int(number)
    suffix = ['th', 'st', 'nd', 'rd', 'th'][min(_number % 10, 4)]
    if 11 <= (_number % 100) <= 13:
        suffix = 'th'
    return f'{_number}{suffix}'