
12 Nov
2005
12 Nov
'05
3:56 p.m.
Related to this, there is a very interesting article on comparing IEEE floats at http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm This makes use of the property that IEEE floating point formats are lexicographically ordered when reinterpreted as an appropriate length signed integer. It appears you can use this to define a closeness measure based on how many units in the last place the two numbers differ by (equivalently, if you enumerated all possible floats and counted how far away one number is from the other in the enumeration). I only just came across it now so I havn't tried playing with it yet, but it looks like it would make a useful closeness measure. Cheers, Ian McCulloch