diff --git a/Source/FloatHelper.cs b/Source/FloatHelper.cs index 431eb96..ff27a1b 100644 --- a/Source/FloatHelper.cs +++ b/Source/FloatHelper.cs @@ -26,8 +26,21 @@ namespace Nuclex.Support { /// Helper routines for working with floating point numbers /// - /// The floating point comparison code is based on this excellent article: - /// http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + /// + /// The floating point comparison code is based on this excellent article: + /// http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + /// + /// + /// "ULP" means Unit in the Last Place and in the context of this library refers to + /// the distance between two adjacent floating point numbers. IEEE floating point + /// numbers can only represent a finite subset of natural numbers, with greater + /// accuracy on the lower end of the range and lower accuracy for very large numbers. + /// + /// + /// If a comparison is allowed "2 ulps" of deviation, that means the values are + /// allowed to deviate by up to 2 adjacent floating point values, which might be + /// as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. + /// /// public static class FloatHelper { @@ -85,7 +98,7 @@ namespace Nuclex.Support { /// True if both numbers are equal or close to being equal /// /// - /// Floating point values can only represent a limited series of natural numbers. + /// Floating point values can only represent a finite subset of natural numbers. /// For example, the values 2.00000000 and 2.00000024 can be stored in a float, /// but nothing inbetween them. ///