Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-09-06 11:15:58


"SourceForge.net" <noreply_at_[hidden]> wrote in message
news:E1GKw3s-0007FA-S2_at_sc8-sf-web6.sourceforge.net...
> Assigned to: Beman Dawes (beman_dawes)

Why did this get assiigned to Beman? Is he default assignee?

> Summary: floating point comparison algorithm
>
> Initial Comment:
> The floating point comparison algorithm does not seem
> to work if one of the floating points is zero and the
> other one is close to zero. Here's the code sample

[...]

This is intentional. According my understanding of numeric computations no
value is close to zero with any tolerance. If you indeed want to test that
the value is small, use check_is_small/BOOST_CHECK_SMALL instead. If you
want to check closeness of two values, don't check the difference with zero.
Use the BOOST_CHECK_CLOSE directly with values you are comparing.

Gennadiy


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