def set_float_param(params, name, value, min=None, max=None):
    """
    Set a float parameter if applicable.

    :param dict params: A dict containing API call parameters.

    :param str name: The name of the parameter to set.

    :param float value:
        The value of the parameter. If ``None``, the field will not be set. If
        an instance of a numeric type or a string that can be turned into a
        ``float``, the relevant field will be set. Any other value will raise a
        `ValueError`.

    :param float min:
        If provided, values less than this will raise ``ValueError``.

    :param float max:
        If provided, values greater than this will raise ``ValueError``.

    :returns: ``None``
    """
    if value is None:
        return

    try:
        value = float(str(value))
    except:
        raise ValueError(
            "Parameter '%s' must be numeric (or a numeric string) or None,"
            " got %r." % (name, value))
    if min is not None and value < min:
        raise ValueError(
            "Parameter '%s' must not be less than %r, got %r." % (
                name, min, value))
    if max is not None and value > max:
        raise ValueError(
            "Parameter '%s' must not be greater than %r, got %r." % (
                name, min, value))

    params[name] = str(value)
Set a float parameter if applicable.

    :param dict params: A dict containing API call parameters.

    :param str name: The name of the parameter to set.

    :param float value:
        The value of the parameter. If ``None``, the field will not be set. If
        an instance of a numeric type or a string that can be turned into a
        ``float``, the relevant field will be set. Any other value will raise a
        `ValueError`.

    :param float min:
        If provided, values less than this will raise ``ValueError``.

    :param float max:
        If provided, values greater than this will raise ``ValueError``.

    :returns: ``None``