From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-05-25 11:59:55
As it happens, I am also just now using this to check my collection of high
accuracy man constants and I am similarly confused.
If I want to check that two values differ by not more than just one binary
ULP (least significant bit), is the BOOST_CHECK_CLOSE tolerance
numeric_limits<double>::epsilon() * 100.?
*100. because tolerance is in percent - sniff ;-)
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539 561830 +44 7714 330204
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Jody Hagins
| Sent: 25 May 2005 17:06
| To: boost_at_[hidden]
| Subject: [boost] [test] Confusion about BOOST_CHECK_CLOSE
| I have re-read everything I can find about BOOST_CHECK_CLOSE, and the
| doc on floating point comparison algorithms (i.e.close_at_tolerance).
| However, I am still confused about how to use
| BOOST_CHECK_CLOSE. Could
| we have some clear examples of comparisons that pass/fail
| with different
| tolerance settings, and some explanation as to how changing the
| tolerance may affect the test?
| Currently, I have a test, using BOOST_CHECK_CLOSE() which passes, no
| matter how big/small I set the tolerance; yet the values are
| Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk