Boost logo

Boost :

From: Dave Steffen (dgsteffen_at_[hidden])
Date: 2007-02-16 12:45:25

John Maddock writes:
> Gennadiy Rozental wrote:
> > Which particular words/statements you are having difficulties with?
> The problem for me is that it's too easy to forget that BOOST_CHECK_CLOSE
> refers to a persentage and not a relative error. I've lost count of how
> many times I've made that mistake, even though I do understand what it does.
> BOOST_CHECK_CLOSE_FRACTION is an improvement, but still doesn't spell out
> what it does.
> Personally I would have liked these to have been really explicit:

 Exactly. I suspect the various grumblings that Gennadiy hears about
 this topic has much more to do with a mismatch between names and
 people's expectations than any fundamental problems.

> To put things another way: how many people do you expect to
> thinking in terms of persentage differences between floating point
> numbers? I'm afraid we (mostly) all think in terms of epsilon
> units, and once in that mind set, converting to persentages just
> doesn't come naturally.

 Right. At least, that's true of people like me who do mathematical
 stuff. Maybe there are vast herds of C++ programmers out there who
 think in terms of percentage tolerance, though. I'm not saying it
 was necessarily a bad design problem. It's a (mildly) bad design for
 what _I_ want, but then, I'm wrapping the whole unit test library up
 in my own interface anyway. :-)

Dave Steffen, Ph.D. Disobey this command!
Software Engineer IV - Douglas Hofstadter
Numerica Corporation
dg_at_steffen a_at_t numerica d_at_ot us (remove @'s to email me)

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