Boost logo

Boost :

Subject: Re: [boost] boost-test, why is there no DOUBLES_EQUAL?
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-04-09 06:03:29

Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at>> writes:

> My point is that *usually* one should prefer later.
> >
> Perhaps, but that makes an implicit assumption about the "usual"
> application.

I used word usually only because I prefer never or rarely use
absolute statements.

> In any case, usual or not, do we accept that absolute
> tolerances are sometimes preferable to relative tolerances?
> I would.

I would not. In my experience I've never seen a necessity for one
(excluding the case where you want to check if something is small and
in this case BOOST_CHECK_SMALL is strait to the point). I'd say that
*usually* ;) desire to use absolute tolerance just indicates either
lack of knowledge or lack of foresight. Even if you can come up with
proper tolerance today, what will happen tomorrow when you change the
notional or apply the same test in some other unrelated domain? With
fraction based tolerance you can be much more comfortable that your
test is still valid.

> absolute tolerances; do we not trust users enough to determine on
> their own which tolerance type is appropriate for their application?

Yes. That one of the concerns on my part. In addition one you have
two ways to do the same thing you'll have never ending stream of
questions: what should one use?


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