From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-06-21 03:43:47
> The borland test failures all come down to failing CHECK_NOT_CLOSE
> macros defined within the test file.
> My understanding is poor, because it looks to me that the following
> cases SHOULD fail:
> CHECK_NOT_CLOSE( 0, 1e-20, 1e-5 );
> CHECK_NOT_CLOSE( 0, 1e-30, 1e-5 );
> CHECK_NOT_CLOSE( 0, -1e-10, 0.1 );
> CHECK_NOT_CLOSE( 0.123456, 0.123457, 1e-4 );
> CHECK_NOT_CLOSE( 1.111e-10, 1.112e-10, 0.08999 );
> CHECK_NOT_CLOSE( 1, 1.0002, 1.1e-2 );
> However, it is clear the following is a genuine error:
> CHECK_NOT_CLOSE( 0.123456, -0.123457, 1e-3 );
> I am obviously missing something, as the majority of compilers pass the
> test as written.
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk