Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-07-10 02:51:50


I suggest you show how to get an absolute comparison in the documentation.
I have found absolute comparisons most useful (but also relative sometimes).

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

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Mobile mailto:pabristow_at_[hidden]
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Gennadiy Rozental
| Sent: Wednesday, July 09, 2003 10:55 AM
| To: boost_at_[hidden]
| Subject: [boost] Re: Re: test_fp_comparisons and rounding errors
|
|
|
| > Could you please be more specific about which Boost.Test features you
| think
| > should remain and which should be removed or modified? I'm having trouble
| > relating the discussion to the actual Boost.Test public interface.
| >
| > Thanks,
| >
| > --Beman
|
| The only thing I propose to change is to prohibit defining tolerance by the
| number of rounding errors. User still will be able to use BOOST_CHECK_CLOSE
| tool with the FP tolerance as a third parameter.
|
| Gennadiy.
|
|
|
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|


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