EqualConstraint.Ulps Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Switches the .Within() modifier to interpret its tolerance as a distance in representable values (see remarks).
public NUnit.Framework.Constraints.EqualConstraint Ulps { get; }
member this.Ulps : NUnit.Framework.Constraints.EqualConstraint
Property Value
Self.
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.