import math


def float_in_range(value: float, lower: float, upper: float) -> bool:
    """Checks if a float is within a range.

    In addition to checking if lower < value < upper, checks if value is close to the end points;
    if so, returns True. This is to account for the vageries of floating point precision.

    args:
        value: The value to check.
        lower: The lower bound of the range.
        upper: The upper bound of the range.
    return:
        _: The value is in the range.
    """

    return (
        (lower <= value <= upper)
        or math.isclose(value, lower)
        or math.isclose(value, upper)
    )