ulp
The unit in the last place of this value.
Declaration
var ulp: Float16 { get }Discussion
This is the unit of the least significant digit in this value’s significand. For most numbers x, this is the difference between x and the next greater (in magnitude) representable number. There are some edge cases to be aware of:
If
xis not a finite number, thenx.ulpis NaN.If
xis very small in magnitude, thenx.ulpmay be a subnormal number. If a type does not support subnormals,x.ulpmay be rounded to zero.greatestFiniteMagnitude.ulpis a finite number, even though the next greater representable value isinfinity.
See also the ulpOfOne static property.