EqualConstraint<TExpected>.

Ulps Property

Summary

Switches the .Within() modifier to interpret its tolerance as a distance in representable values (see remarks).
Namespace
TCLite.Constraints
Containing Type
EqualConstraint<TExpected>

Syntax

public EqualConstraint<TExpected> Ulps { get; }

Remarks

Ulp stands for "unit in the last place" and describes the minimum amount a given value can change. For any integers, an ulp is 1 whole digit. For floating point values, the accuracy of which is better for smaller numbers and worse for larger numbers, an ulp depends on the size of the number. Using ulps for comparison of floating point results instead of fixed tolerances is safer because it will automatically compensate for the added inaccuracy of larger numbers.

Value

Type Description
EqualConstraint<TExpected>