편집

다음을 통해 공유


EqualConstraint.Ulps Property

Definition

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.

Applies to