|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-06-21 09:56:55
"Alisdair Meredith" <alisdair.meredith_at_[hidden]> wrote in message
news:d98vdr$oia$1_at_sea.gmane.org...
> Gennadiy Rozental wrote:
>
>> All of the above should pass, since the algotrithm used:
>>
>> x and y are close iff:
>>
>> |x-y| / |x| < tol/100 and |x-y| / |y| < tol/100
>>
>> Obviosly nothing could be close to zero and rest are failing also.
>
> In that case I find the algorithm to be confusingly named, as in all
> these cases the test value is 'closer' to zero than the delta. I would
> not expect closeness to zero (or any other arbitrary number) to affect
> a general proximity test.
There is a new tool introduced in this release called BOOST_CHECK_SMALL to
check that some value is small enough (close to zero). That one uses
absolute (vs. relative) values comparisons.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk