Boost logo

Boost :

Subject: Re: [boost] boost-test, why is there no DOUBLES_EQUAL?
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-04-09 02:36:45


On Fri, Apr 8, 2011 at 7:42 PM, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:

> Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at> gmail.com> writes:
>
> > > My point was to nudge you toward percent or fraction based tolerance.
> > I believe the OP had already explained why relative tolerances were
> > incorrect for his/her application.
>
> I don't think so. He claimed he want absolute difference comparison without
> explaining why and relative is not applicable.
>

Okay, there probably weren't enough details for a thorough justification, so
my claim was indeed incorrect. I meant to say something along the lines of:
I took the OP at his/her word that he/she had determined that absolute
tolerances were correct to use and relative tolerances were incorrect.

My point is that *usually* one should prefer later.
>

Perhaps, but that makes an implicit assumption about the "usual"
application. In any case, usual or not, do we accept that absolute
tolerances are sometimes preferable to relative tolerances? I would. If
so, does it occur frequently enough to warrant the macro(s) (or a similar
one(s)) that the OP suggested, similar to existing macros that check
equality within relative tolerances? I don't know. But the only drawback I
see with including such macros is a perhaps misplaced encouragement from the
point of view of users to use the macros which determine equality within
absolute tolerances; do we not trust users enough to determine on their own
which tolerance type is appropriate for their application?

- Jeff


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