Boost logo

Boost :

Subject: Re: [boost] boost-test, why is there no DOUBLES_EQUAL?
From: Sebastian Nowozin (nowozin_at_[hidden])
Date: 2011-04-11 12:51:23


On Sat, Apr 9, 2011 at 3:42 AM, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:

> Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at>> 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.
> My point is that *usually* one should prefer later.

The values I compare come from a Monte Carlo procedure, and are
guaranteed to lie within a certain absolute tolerance.
I compare the Monte Carlo results against exact values. Numerical
stability is not an issue as these values are within the range zero to

Therefore, you can safely assume that absolute deviation is the
criteria I want to use, and is popularly used in the literature for
this purpose (the so called total variation distance). I do not want
to use relative comparisons, in particular because normalizing by a
very small value such as 1.0e-10 can happen in that case.


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