def negative_real(var, var_name):
    """
    Check if parameter *var* is a negative number.

    :raises TypeError: Parameter *var* must be a real number.
    :raises ValueError: Parameter *var* must be a negative number.

    """
    if not isinstance(var, (int, float)):
        raise TypeError('\n\nParameter {} must be a real number.\n'.format(
            var_name))
    if var >= 0:
        raise ValueError('\n\nParameter {} must be a negative number.\n'.
            format(var_name))
