From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-07-16 16:13:09
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Rozental, Gennadiy
| Sent: Friday, July 11, 2003 7:39 PM
| To: 'Boost mailing list'
| Subject: RE: [boost] Re: Re: test_fp_comparisons and rounding errors
| > Do I understand correctly that
| > BOOST_CHECK_CLOSE(v1, v2, 2. * std::numeric_limits::epsilon() );
| > would check that the absolute difference between v1 and v2 is
| > not more than two eps?
| > Paul
| No. BOOST_CHECK_CLOSE performs relative errors comparison. See
| (Ignore part that tries to calculate the tolerance based on number of
| rounding errors)
Yes of course - sorry. So how would I achieve the above test?
Personally I would still like to have the option of picking the absolute number
of epsilons difference allowed - the number of least significant bits that are
You are right that relative difference is usually what one wants - but not
always in my experience.
But I think that presenting it as 'number of rounds' is what is confusing and
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk