From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-04-29 14:33:16
Paul A Bristow wrote:
>> T edit_distance(T a, T b)
>> Returns the number of floating point representations between values a and b.
> Definitely useful.
> Not convinced by this name, but I'll think about it.
> Signed sounds obvious but I suspect choice may be more complicated than it seems.
It's more intuitive to get the unsigned value from the signed than the
other way around.
copysign(edit_distance(a, b), b - a)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk