Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-11-10 13:41:02

I strongly support John on this request. Having very similar needs with
using Boost test on math functions.

I've also suspected some strange behaviour caused by the * or / 100.0 which
introduces another source of slight change.


Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
mailto: pbristow_at_[hidden]
| -----Original Message-----
| From: boost-bounces_at_[hidden] 
| [mailto:boost-bounces_at_[hidden]] On Behalf Of John Maddock
| Sent: 10 November 2005 16:47
| To: Boost mailing list
| Subject: [boost] [Test] BOOST_CHECK_CLOSE Feature request
| I have a couple of feature requests for Boost.Test:
| 1) Can BOOST_CHECK_CLOSE please print the actual difference 
| between the 
| values (as a percent to match the tolerance) as well as the values 
| themselves?  The reason this is important, is that it's not 
| always easy to 
| get this value from the input values - because the precision 
| of the machine 
| on which the test is run far outstrips that of the author's 
| machine, so his 
| calculator isn't any use :-(
| 2) Can we please have a BOOST_CHECK_EPSILON, that uses a 
| whole number of 
| epsilon as the tolerance?  IMO BOOST_CHECK_CLOSE should have 
| been written 
| this way to begin with, but it's too late now.  Again it 
| should print out 
| the actual relative error as a multiple of epsilon as well as 
| the input 
| values.  Actually while we're at it the absolute error may be 
| useful to have 
| in some situations as well :-)
| BTW, in case it helps: I've switched to using std::pow(two, 
| 1-std::numeric_limits<T>::digits) to calculate machine 
| epsilon, because of 
| the strange behaviour on Darwin with long doubles if you use 
| numeric_limits<>::epsilon() (see 

Boost list run by bdawes at, gregod at, cpdaniel at, john at