Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] CLOSE and CLOSE_FRACTION tolerance
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-06-03 12:23:10

Edward Diener <eldiener <at>> writes:

> >> These are using strict check:
> >>
> >> |a-b|/|a|< tolerance
> >> and
> >> |a-b|/|b|< tolerance

> Or perhaps you mean that for both CLOSE and CLOSE_FRACTION both cases
> above are calculated ? In which case I still do not understand what is
> the difference between "percentage units" and "fraction of absolute value".

Yes. Both tools use strict comparison. "tolerance" in above inequalities is
measured in "fraction units". To get "percentage units" you need to multiply
the tolerance by 100.

Usually it's easier to think in "percentage units" form: a is different from b
by x percent, but fraction tolerances are popular as well.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at