Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-04-29 14:33:16


AMDG

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.
std::abs(edit_distance(a, b))

vs.

copysign(edit_distance(a, b), b - a)

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk