def check_float(value, minimum=None, maximum=None, exclusive_minimum=False,
    exclusive_maximum=False, multiple_of=None, allow_none=False):
    """
    Validate a floating point value

    Parameters
    ----------
    value : int or float
        Value to validate
    minimum : int or float, optional
        The minimum value allowed
    maximum : int or float, optional
        The maximum value allowed
    exclusive_minimum : boolean, optional
        Should the minimum value be excluded as an endpoint?
    exclusive_maximum : boolean, optional
        Should the maximum value be excluded as an endpoint?
    multiple_of : int or float, optional
        If specified, the value must be a multple of it in order for
        the value to be considered valid.
    allow_none : boolean, optional
        Should a None value be allowed?

    Returns
    -------
    float
        The validated floating point value

    """
    if allow_none and value is None:
        return value
    out = float(value)
    if minimum is not None:
        if out < minimum:
            raise ValueError('%s is smaller than the minimum value of %s' %
                (out, minimum))
        if exclusive_minimum and out == minimum:
            raise ValueError(
                '%s is equal to the exclusive nimum value of %s' % (out,
                minimum))
    if maximum is not None:
        if out > maximum:
            raise ValueError('%s is larger than the maximum value of %s' %
                (out, maximum))
        if exclusive_maximum and out == maximum:
            raise ValueError(
                '%s is equal to the exclusive maximum value of %s' % (out,
                maximum))
    if multiple_of is not None:
        if out % int(multiple_of) != 0:
            raise ValueError('%s is not a multiple of %s' % (out, multiple_of))
    return out
