add a Math.Ulp function
ULP mean Unit in the Last Place.
It is implemented in Java and is useful in some cases.
Here is some code I have write, but I'm not sure of my implementation :
float absX = Math.Abs(value);
byte[] bytes = BitConverter.GetBytes(absX);
if (BitConverter.IsLittleEndian)
bytes[0]++;
else
bytes[bytes.Length - 1]++;
float nextFloatNumber = BitConverter.ToSingle(bytes, 0);
return (nextFloatNumber - absX);
Take a look at :
http://stackoverflow.com/questions/1668183/find-min-max-of-a-float-double-that-has-the-same-internal-representation
See Precision.EpsilonOf (and .Increment/.Decrement/.DumbersBetween/.CompareTo etc)