def invcdf_uniform(val: float, lb: float, ub: float) -> float:
    """Returns the inverse CDF lookup of a uniform distribution. Is constant
        time to call.

    Args:
        val: Value between 0 and 1 to calculate the inverse cdf of.
        lb: lower bound of the uniform distribution
        ub: upper bound of the uniform distribution

    Returns:
        Inverse CDF of a uniform distribution for the provided value.

    Examples:
        >>> invcdf_uniform(1, 5, 10)
        10
        >>> invcdf_uniform(0, 5, 10)
        5
        >>> invcdf_uniform(0.5, 5, 10)
        7.5
    """
    if val < 0:
        return -float("inf")
    elif val > 1:
        return float("inf")
    else:
        return val * (ub - lb) + lb