# `upperboundfloat` (threshold type)

Thresholds with `type="upperboundfloat"` enable a customizable upper limit over which a float is considered invalid. This can be used, for example, for statistical error results where a higher value is worse, and a lower limit is unnecessary.

This is an example definition:

>         {name="FloatScore2", type="upperboundfloat", default=80.0, range={0, 100}}

This is how it appears in the result section of the tool panel. The result and the threshold are indicated by a single-handle slider for the threshold and an indication of the value of the result:

The current values of an `upperboundfloat`-threshold is accessed via `self.thresholds` in `execute`, which provides a `Threshold` instance. To base the overall result of the tool on the threshold a value for Pass needs to be set in the output:

>       local floatScore2 = 85.0
>       output:add("Pass", self.thresholds.FloatScore2:contains(floatScore2))

See also

- lowerboundfloat (threshold type)