Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-02-16 13:22:52

Dave Steffen wrote:
> Well, IIRC BOOST_CHECK_CLOSE does a check for _relative error_. And
> you can't do relative error if one of the numbers is zero. From a
> conceptual point of view, relative error says that two values differ
> by an amount that is small relative to their magnitude. Zero has no
> magnitude, e.g. no information about what's small relative to it, so
> the question is meaningless.

Apologies: I saw the "small" but not the "or zero".

Yes, that's something I've had to work around as well. Trouble is I
suspect everyone has their own ideas about what represents failure in this
case. I currently use: "Any zero or denormalised number is treated as if it
were a zero", and that works for what I need. I suspect some folks will
want either more or less strict conditions depending on what they're doing.


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