On 22.11.2012 18:29, Branko Čibej wrote:
> On 22.11.2012 17:01, Julian Foad wrote:
>> Just use 'float' and [0..1]?  I'm thinking we may want to use this for 
>> comparing diff hunks, and there may be more than 500 characters in each hunk 
>> and it matters whether just one character has been changed.
> Could do that, too. Harder to test though. :) It's trivial to extend the
> range to [0..10**6] or even 10**9 if that's a problem. Frankly it feels
> nice to keep the whole thing integral and not leave floating-point
> messes around.

Actually I'm being silly. The function already provides the actual LCS
length, so if 3 significant digits aren't enough, you can always compare
that to the length of the hunk.

-- Brane


-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com

Reply via email to